tcpdump mailing list archives
Re: libpcap: patches required for OpenSolaris/SXCE
From: Guy Harris <guy () alum mit edu>
Date: Tue, 1 Dec 2009 18:48:00 -0800
On Dec 1, 2009, at 6:37 AM, Sebastien Roy wrote:
I would argue that it's a bug on Solaris that libpcap depends on IP-layer information to choose a capture interface (if that is in fact what it does),
It depends on whatever mechanisms the OS provides that supply a list of interfaces. If the OS provides no mechanism that can supply interfaces with no IP addresses, that's not a libpcap bug *on* the OS in question, it's a deficiency *in* the OS in question.
bash-3.2# tcpdump -i bge0 tcpdump: WARNING: SIOCGIFADDR: bge0: No such device or address
This means "sorry, if you're expecting -f to work or a filter containing 'ip broadcast' to work, you're going to be disappointed".
Does the errno corresponding to "No such device or address", when returned by ioctl(SIOCGIFADDR), mean "this device doesn't have an address of the type"? Or can it also mean "there is no such device"?
The WARNING there seems spurious, and the use of SIOCGIFADDR questionable. Why should tcpdump care about the IP addresses assigned to bge0 when observing at the link-layer?
See above. If pcap_lookupnet () fails, we can immediately report the failure as an error if -f is specified, and possibly specify the out- of-range netmask value to pcap_compile() if -f is not specified, and have pcap_compile() report an error in that case.
FWIW, it appears to select a default interface just fine, so it would appear to not use the SIOCG* socket ioctls for interface selection:
Nope, it uses SIOCGLIFCONF. - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: libpcap: patches required for OpenSolaris/SXCE, (continued)
- Re: libpcap: patches required for OpenSolaris/SXCE Guy Harris (Nov 30)
- Re: libpcap: patches required for OpenSolaris/SXCE Darren Reed (Nov 30)
- Re: libpcap: patches required for OpenSolaris/SXCE Guy Harris (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Sebastien Roy (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Darren Reed (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Guy Harris (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Darren Reed (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Sebastien Roy (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Guy Harris (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Guy Harris (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Guy Harris (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Sebastien Roy (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Guy Harris (Dec 01)
- Re: libpcap: patches required for OpenSolaris/SXCE Darren Reed (Nov 27)