Date: Tue, 30 Jun 1998 10:49:45 -0700 (PDT) From: Jim Shankland <jas@flyingfox.com> To: wollman@khavrinen.lcs.mit.edu Cc: freebsd-current@FreeBSD.ORG Subject: Re: Retrieving routing table via sysctl Message-ID: <199806301749.KAA14567@biggusdiskus.flyingfox.com>
next in thread | raw e-mail | index | archive | help
Garrett Wollman <wollman@khavrinen.lcs.mit.edu> writes: > <<On Tue, 30 Jun 1998 06:27:57 -0700 (PDT), Jim Shankland <jas@flyingfox.com> said: > > > struct rt_msghdr tell you which sockaddr's are present. Beware: the > > sockaddr for a netmask is only 8 bytes long. > > That's because it really isn't a sockaddr at all -- it's just a byte > count followed by a bit mask. The only reason you don't see three-byte > masks for IP /8 routes is the alignment padding. OK, I'll buy that. I guess I got fooled by net/route.c consistently declaring these things as 'struct sockaddr' :-). Jim Shankland Flying Fox Computer Systems, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806301749.KAA14567>