Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Sep 2001 15:08:42 +0200
From:      Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        karels@BSDI.COM, Bill Fenner <fenner@research.att.com>, arch@FreeBSD.ORG
Subject:   Re: Causing <netinet/in.h> to depend on <sys/socket.h>
Message-ID:  <20010910150842.G67566@daemon.ninth-circle.org>
In-Reply-To: <3B9A112D.5909ECE@mindspring.com>
References:  <200109072110.f87LADX15133@redrock.eng.bsdi.com> <3B9A112D.5909ECE@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-On [20010908 15:00], Terry Lambert (tlambert2@mindspring.com) wrote:
>I haven't seen where the sockaddr_storage type is used, yet
>(no one has posted anything),

217 occurences in the /usr/src tree.

>but it seems to me that if, when it is used, it is used as an opaque
>pointer type, where possible, then this avoids the need to pollute the
>namespace unless someone is referencing members of the structure, which
>means they are actually using it, which means that they can darn well
>include a header file to get the non-opaque version of the structure
>declaration so that they can instance the thing.

It needs to be defined in <sys/socket.h> [as per POSIX and SUS decree].

``The sockaddr_storage structure solves the problem of declaring storage
for automatic variables which is both large enough and aligned enough
for storing the socket address data structure of any family.''

It's an opaque type yes, but for all I know just an opaque struct, not a
pointer.

-- 
Jeroen Ruigrok van der Werven/Asmodai asmodai@[wxs.nl|freebsd.org|xmach.org]
Documentation nutter/C-rated Coder, finger asmodai@ninth-circle.dnsalias.net
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/
I search the outside, search inside for you...


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?20010910150842.G67566>