From owner-freebsd-standards@FreeBSD.ORG Tue May 31 20:05:48 2005 Return-Path: X-Original-To: standards@freebsd.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B742F16A41C; Tue, 31 May 2005 20:05:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (berlin-qwest.village.org [168.103.84.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id A983843D49; Tue, 31 May 2005 20:05:47 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j4VK3Y1V066276; Tue, 31 May 2005 14:03:34 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 31 May 2005 14:03:34 -0600 (MDT) Message-Id: <20050531.140334.74683681.imp@bsdimp.com> To: des@des.no From: Warner Losh In-Reply-To: <86fyw3b4c2.fsf@xps.des.no> References: <86k6lfbafu.fsf@xps.des.no> <20050531.115338.74685129.imp@bsdimp.com> <86fyw3b4c2.fsf@xps.des.no> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2005 20:05:49 -0000 > Warner Losh writes: > > Dag-Erling Sm=F8rgrav writes: > > > What do we gain from removing the padding? Is there even a singl= e > > > 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 header shall define the addrinfo structure that inclu= des > > 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. Did you bother reading what I posted? I don't think so since you'd have known that ai_addrlen was changed to be socklen_t for posix compliance, and the padding was added for ABI compatibility. The removal of padding is the normal sort of thing that's done during major revisions. It was there, indirectly, for POSIX compliance. Maybe the padding removal is too painful given all the extra 'oh, by the ways' that we're stumbling over. Warner