tcpdump mailing list archives
Re: libpcap on linux issue
From: Darren Reed <darrenr () reed wattle id au>
Date: Wed, 12 Feb 2003 22:15:07 +1100 (EST)
In some email I received from Guy Harris, sie wrote:
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.cSo presumably this means that RH 8.0 has "getifaddrs()".
Yes: /usr/include/ifaddrs.h:extern int getifaddrs (struct ifaddrs **__ifap) __THROW;
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;
I get a man page for ipv6(7)...
2) "struct sockaddr" is big enough, in those systems, for an IPv6 address;
It's 64 bytes big.
3) "struct ifaddrs", on that platform, doesn't have "struct sockaddr" pointers in it.
It does have them. I'll email you /usr/include/ifaddrs.h from RH8.0 separately.
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?
That I can't answer. Darren - 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)