on HP-UX, just keep trying different SAPs until we find one that doesn't
return EBUSY, as attempting to use a SAP that some other descriptor is
already bound to returns EBUSY.
What it does includes checking whether the packet is of the type
specified by the <proto> argument, so there's no need to add such a
check when checking whether the ISO protocol type field has a particular
value; remove the extra check against the ISO protocol.
Fix a typo in a comment.
"gen_ether_linktype()" and "gen_linux_sll_linktype()", as well as
"gen_linktype()".
Add comments for those routines to indicate how they handle the protocol
type argument.
In "gen_linux_sll_linktype()", merge together the handling of
LLCSAP_ISONS, LLCSAP_IP, and LLCSAP_NETBEUI, as was done in
"gen_ether_linktype()" and "gen_llc_linktype()".
Merge the code to handle the LLCSAP_ISONS, LLCSAP_IP, and
LLCSAP_NETBEUI.
"gen_ether_linktype()" already handles SAPs as protocol IDs; just use it
for Ethernet, rather than using "gen_llc()" (which isn't prepared to
handle Ethernet, with off_linktype pointing to the type/length field
rather than the DSAP).
That also means that "gen_linktype(LLCSAP_ISONS)" can be used to test
for OSI packets on Ethernet.
Expand some comments.
Fix a typo ("off_nl = +4" should've been "off_nl += 4").
by checking the proto against the ethermtu and bumping
the link-layer offset by two.
-add support for vlan and mpls hierarchies by not absolute
setting offsets but rather incrementing them;
example(s):
mpls 100000 && mpls 1024
=filters for outerlabel 100000 and inner label 1024
vlan 100 && vlan 200
=filters for vlan 200 encapsulated withing vlan 100
vlan 300 && mpls 17
=filters for mpls label 17 encapsulated in vlan 300
<netinet/ether.h> declares ether_hostton(), so the failure to find it
declared in <netinet/in_ether.h> doesn't cause us to assume we won't
find it anywhere.
Fix a typo in a comment.
make the second one similar.
Get rid of the # in the "Rechecking with some additional #includes"
message, as it's a shell comment character and screws up the script.
Fix a typo in a comment.
<netinet/if_ether.h>, so we try the second test with the additional
includes and definitions).
Log a message before doing the second test, to show why we're testing
twice.
on Solaris, it's a "gethostbyname() -ish function", and we'll find it
only when we're linking with whatever libraries are required for finding
those functions.
Get the AC_LBL_LIBRARY_NET macro from tcpdump; that macro works with
autoconf 2.5x, but the one here didn't.
and if including it declares ether_hostton(), and define
HAVE_DECL_ETHER_HOSTTON appropriately, and use that to determine whether
to define it ourselves, rather than having a set of OSes that don't need
it, as that set can change over time.
Make the default declaration of "ether_hostton()" declare its first
argument as "const char *", as that's what it's *supposed* to be
(although it's not declared as such in some OSes, so we still have to
cast a "const char *" when passed as the first argument).
one packet from the kernel at a time, when the filter is changed, clear
the libpcap buffer to discard packets read from the kernel before the
filter was changed.
rename it again to DLT_PPP_PPPD, and rename other #defines to match.
Add backwards-compatibility #defines of DLT_PPP_WITH_DIRECTION and
DLT_LINUX_PPP_WITHDIRECTION for software that used them.
additional IP addresses for the underlying interface; instead, strip off
the logical interface number, and add them so that the additional
addresses are added.
to the list of interfaces, so we don't, for example, include the
loopback device in the list on Solaris - SIOCGIFCONF/SIOCGLIFCONF will
find the device, as it has an IP address, but it's not a DLPI device so
you can't open it for capturing.