Date: Tue, 31 May 2005 21:09:01 +0200 From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) To: Warner Losh <imp@bsdimp.com> Cc: nectar@freebsd.org, standards@freebsd.org, freebsd-arch@freebsd.org, current@freebsd.org Subject: Re: [CFR] correct type of addrinfo.ai_addrlen and netent.n_net Message-ID: <86fyw3b4c2.fsf@xps.des.no> In-Reply-To: <20050531.115338.74685129.imp@bsdimp.com> References: <86fyw32yqm.fsf@xps.des.no> <ygesm03ie9a.wl%ume@mahoroba.org> <86k6lfbafu.fsf@xps.des.no> <20050531.115338.74685129.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@bsdimp.com> writes: > Dag-Erling Sm=F8rgrav <des@des.no> writes: > > What do we gain from removing the padding? Is there even a single > > practical benefit to doing so? > It is for posix compatibility. Nonsense. POSIX does not forbid padding or additional structure members. The exact wording is: > The <netdb.h> header shall define the addrinfo structure that includes > at least the following members: -------- > > int ai_flags Input flags. > int ai_family Address family of socket. > int ai_socktype Socket type. > int ai_protocol Protocol of socket. > socklen_t ai_addrlen Length of socket address. > struct sockaddr *ai_addr Socket address of socket. > char *ai_canonname Canonical name of service location. > struct addrinfo *ai_next Pointer to next in list. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86fyw3b4c2.fsf>