Subject: Re: struct route
To: None <thorpej@zembu.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 07/13/2000 03:58:16
> > >ok, how about:
> > >struct route {
> > >	struct rtentry *ro_rt;
> > >	union {
> > >		struct sockaddr roun_dst_sa;
> > >		struct sockaddr_storage roun_dst_ss;
> > >	} ro_un;
> > >#define	ro_dst		ro_un.roun_dst_sa	/* compatiblity */
> > >#define	ro_dst_sa	ro_un.roun_dst_ss
> > >};
> > 	we tried the above already.  it choked sys/netiso (ro_dst is
> > 	used as the name of struct member, and chokes with #define).
> > 	so we'd need to touch sys/netiso anyways even if we use the above.
>So, we should touch netiso and nuke route_iso just like you're going to
>nuke route_in6.  We've already agreed that it's a bad hack :-)

	alright, actually union (the above) is safer than adding
	"char padding[]" against compiler with struct member reorder (some
	embedded system compiler do that, i heard before...)
	i'll play with it locally and will bring it into the tree.

itojun