From owner-freebsd-net Wed Jul 12 16:30:56 2000 Delivered-To: freebsd-net@freebsd.org Received: from coconut.itojun.org (coconut.itojun.org [210.160.95.97]) by hub.freebsd.org (Postfix) with ESMTP id 35AE937B87D for ; Wed, 12 Jul 2000 16:30:53 -0700 (PDT) (envelope-from itojun@itojun.org) Received: from kiwi.itojun.org (localhost.itojun.org [127.0.0.1]) by coconut.itojun.org (8.9.3+3.2W/3.7W) with ESMTP id IAA28561; Thu, 13 Jul 2000 08:30:42 +0900 (JST) To: Garrett Wollman Cc: net@FreeBSD.ORG In-reply-to: wollman's message of Wed, 12 Jul 2000 15:48:54 -0400. <200007121948.PAA74525@khavrinen.lcs.mit.edu> X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: change to struct route From: itojun@iijlab.net Date: Thu, 13 Jul 2000 08:30:42 +0900 Message-ID: <28559.963444642@coconut.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >> struct route { >> struct rtentry *ro_rt; >> struct sockaddr ro_dst; >> char padding[sizeof(struct sockaddr_storage) - sizeof(struct sockaddr)]; >> }; > >I'd rather see: > >struct route { > struct rtentry *ro_rt; > union { > struct sockaddr dstu_dst; > struct sockaddr_storage dstu_dstss; > } ro_dstu; >}; > >#define ro_dst ro_dstu.dstu_dst >#define ro_dstss ro_dstu.dstu_dstss > >...which would be the Traditional BSD Way to do it. thanks for comment, we now are trying to do just like your suggestion. (we got comment from thorpej@netbsd as well) actually this breaks when someone tries to use ro_dst as other struct member name (4.4BSD netiso does it), but we need to change that portion anyways. itojun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message