[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dccp] Re: dccp_service in sockaddr_dccp{}
Hmm, I'm afraid that I disagree with sockaddr_dccp or sockaddr_in_dccp.
I think most of network programmers get used to using setsockopt(), so
I believe there would not be a big confusion in specifying service code with
setsockopt() rather than using new sockaddr type with bind().
Besides that, I don't know how many applications need to use the service code.
If using the service code is almost mandatory, new sockaddr type might be
better. but I am not very sure about it..
Thanks,
--
Yoshifumi Nishida
nishida at csl.sony.co.jp
From: Eddie Kohler <kohler at cs.ucla.edu>
Subject: Re: [dccp] Re: dccp_service in sockaddr_dccp{}
Date: Thu, 08 Sep 2005 20:52:41 -0700
Message-ID: <43210709.7090808 at cs.ucla.edu>
> I agree with Arnaldo et al. here. The Service Code should be considered
> similar to a port. It is best to specify it at bind() time, rather than
> separately. The structure names may want some updating; sockaddr_in_dccp and
> sockaddr_in6_dccp, rather than sockaddr_dccp, for example. The servicecode
> member should finish off the structure, so that sockaddr_in is a prefix of
> sockaddr_in_dccp. And the code should be smart enough to supply a 0 service
> code if the sa_len corresponds to sockaddr_in instead of sockaddr_in_dccp.
>
> Eddie
>
>
> YOSHIFUJI Hideaki / 吉藤英明 wrote:
> > Hi, Arnaldo and folks,
> >
> > In article <20050909011256.GC19109 at mandriva.com> (at Thu, 8 Sep 2005 22:12:56 -0300), Arnaldo Carvalho de Melo <acme at conectiva.com.br> says:
> >
> >
> >>So we have to provide a way for applications to supply the service code,
> >>it can be in sockaddr_dccp or in a setsockopt, so far we think its better
> >>to have it in sockaddr_dccp.
> >
> >
> > I do think sockopt is much better from the point of view of socket API.
> >
> > 1. sockaddr_xxx{} and AF_xxx make pair.
> > e.g. sockaddr_in{} is used for AF_INET
> > sockaddr_in6{} is used for AF_INET6
> > Type of sockaddr shall be determined by the sa_family member
> > in sockaddr{} (POSIX).
> >
> > 2. It is used only in DCCP-Request / DCCP-Response.
> > It does NOT identify the connection, it is NOT required.
> >
> > I see strong reason we should avoid using new sockaddr{}
> > in this case. Or do I miss something?
> >
>