Date: Thu, 13 Jul 2000 08:30:42 +0900 From: itojun@iijlab.net To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: net@FreeBSD.ORG Subject: Re: change to struct route Message-ID: <28559.963444642@coconut.itojun.org> In-Reply-To: wollman's message of Wed, 12 Jul 2000 15:48:54 -0400. <200007121948.PAA74525@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?28559.963444642>
