tcpdump mailing list archives
Re: libpcap on linux issue
From: Guy Harris <guy () netapp com>
Date: Wed, 12 Feb 2003 00:51:15 -0800
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:tcpdump-workers-request () tcpdump org?body=unsubscribe
Current thread:
- libpcap on linux issue Darren Reed (Feb 11)
- Re: libpcap on linux issue Guy Harris (Feb 12)
- Re: libpcap on linux issue Darren Reed (Feb 12)
- Re: libpcap on linux issue Guy Harris (Feb 12)
- Re: libpcap on linux issue Darren Reed (Feb 13)
- Re: libpcap on linux issue Darren Reed (Feb 12)
- Re: libpcap on linux issue Guy Harris (Feb 12)
- Re: libpcap on linux issue Guy Harris (Feb 12)
- Re: libpcap on linux issue Guy Harris (Feb 12)
- Re: libpcap on linux issue Darren Reed (Feb 13)
- Re: libpcap on linux issue Guy Harris (Feb 13)
- Re: libpcap on linux issue Guy Harris (Feb 25)
- Re: libpcap on linux issue Guy Harris (Feb 12)