Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Sep 2001 13:21:59 -0700
From:      Bill Fenner <fenner@research.att.com>
To:        jlemon@flugsvamp.com
Cc:        arch@freebsd.org
Subject:   Re: Causing <netinet/in.h> to depend on <sys/socket.h>
Message-ID:  <200109082022.NAA13321@windsor.research.att.com>
References:   <200109072125.OAA25298@windsor.research.att.com> <3B9A134D.3B31C443@mindspring.com> <200109081858.LAA12165@windsor.research.att.com> <20010908141005.R20137@prism.flugsvamp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

>It seems that the real problem here is that sockaddr_storage is supposed
>to be protocol-neutral (used for appletalk, IPX, etc), but what your 
>code really wants is IP-specific sockaddr_storage.

Well, sockaddr_storage was introduced to support IPv6; it was defined
to be "at least large enough to accommodate sockaddr_in and sockaddr_in6
and possibly other protocol specific socket addresses too." [RFC 2553
section 3.10].  I guess the "and possibly other..." part is what's not
working out, especially since IEEE Std 1003.1-200x gets rid of the "possibly"
part.

The advantage of sockaddr_storage is that it's already standard, in
widespread use, and was defined for exactly this purpose.

  Bill

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109082022.NAA13321>