[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dccp] Re: dccp_service in sockaddr_dccp{}



Hello.

In article <43210709.7090808 at cs.ucla.edu> (at Thu, 08 Sep 2005 20:52:41 -0700), Eddie Kohler <kohler at cs.ucla.edu> says:

> 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.

Well, I'd prefer rather sockaddr_in_dccp{} than sockaddr_dccp{}.
However, people believe that sockaddr_in shall be used for AF_INET,
and even sockaddr_in_dccp, it does not conform to POSIX.

Socket Address definition in POSIX <http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_349>:
    An address associated with a socket or remote endpoint, including
    an address family identifier and addressing information specific
    to that address family. The address may include multiple parts,
    such as a network address associated with a host system and an
    identifier for a specific endpoint.

netinet/in.h - Internet address family <http://www.opengroup.org/onlinepubs/009695399/basedefs/netinet/in.h.html#tag_13_32>
    The sockaddr_in structure is used to store addresses for the Internet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    address family. Values of this type shall be cast by applications to
    ~~~~~~~~~~~~~~
    struct sockaddr for use with socket functions.

I don't think there's option to choose other than sockaddr_in
for DCCP over IPv4.

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji at linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA