On Wed, Feb 12, 2003 at 02:39:35PM +1100, Darren Reed wrote:
> I'm using libpcap-2002.12.08 on a RedHat 8.0 box and have come across an
> issue that I think is quite serious.
>
> In fad-getad.c
So presumably this means that RH 8.0 has "getifaddrs()".
> One solution to this is changing the #define from being
> "sizeof(struct sockaddr_storage)" to be something else - like this:
> #define SA_LEN(x) sizeof(*x)
...which works only if, on platforms with "struct sockaddr_storage" and
"getifaddrs()", and no "SA_LEN()" macro, no address is bigger than the
type of the addresses in the structure returned by "getifaddrs()". That
either means that
1) IPv6 isn't supported;
2) "struct sockaddr" is big enough, in those systems, for an
IPv6 address;
3) "struct ifaddrs", on that platform, doesn't have "struct
sockaddr" pointers in it.
For each of the platforms with "struct sockaddr_storage" and
"getifaddrs()", and no "SA_LEN()", which of those is the case? (Note
that 1) is a bit behind the times, 2) is a bit surprising, and 3) is a
bit incompatible. That makes 2) the most *desirable* and *sensible* of
those options, but nobody ever went broke assuming developers would
always choose the most desirable and sensible option....)
Or is there some *other* way, on RH 8.0, of inquiring how big the
address pointed to by a pointer in a "struct ifaddrs" is?
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe