DLT_IEEE802_11_RADIO_AVS for future use with the AVS radio header.
Fix a comment.
Put in reserved LINKTYPE_USERn values corresponding to the reserved
DLT_USERn values.
- don't auto-detect HDLC DLT on serial links, use
"pcap_set_datalink()" to choose the link-layer header
- for ATM, allow selecting SUNATM rather than the default
RFC1483 with "pcap_set_datalink()"
- reformat and otherwise clean up the code.
In the Linux kernel the packet statistics are zeroed during each retrieval.
In contrast, on FreeBSD, the packet statistics are retrived using
ioctl(BIOCGSTATS):
The patch adds a static variable to pcap_stats_linux() which
holds a running total of the packet statistics so that the behaviour
of pcap_stats() on Linux matches the behaviour of FreeBSD.
devices, offer DLT_DOCSIS as one of the choices of link-layer type, and
support setting that type as meaning just "set libpcap's notion of the
link-layer type to DLT_DOCSIS" without telling the driver to use
DLT_DOCSIS.
file that defines MASK, so when compiling the lexical analyzer, if INET6
is defined you get a redefinition warning. Use NETMASK rather than MASK
for the token "mask".
"snprintf()", include one in libpcap with the name "pcap_snprintf()", so
applications don't have to supply their own "snprintf()" on those
platforms in order to use libpcap.
were read, so we check "p->break_loop"; that way, we can break out of
the loop even if we get no packets (because of a timeout).
Also, check "p->break_loop" before reading packets from the driver.
first check whether BIOCVERSION works;
then, if so, check whether the version is OK for us;
then, if so, try to install the filter - if that succeeds, free
up any userland filter we had installed, if any, and filter in
the kernel, otherwise fail;
otherwise, if we couldn't get the version or the version check
failed, install a userland filter.
That way, we don't install kernel filters unless we know the kernel's
BPF interpreter is OK for us (rather than checking the version *after*
we've already installed the filter), and don't have to worry about that
filter being in the kernel (possibly with an inappropriate interpreter)
if we're filtering in userland.
Clean up the "version isn't OK" message (put in a newline at the end,
and put in "tcpdump:" at the beginning).
userland filter before setting the "filtering is being done in the
kernel" flag to 0, and note in a comment that we've already handed the
BPF program to the older BPF interpreter in the kernel.
Added support for nonblocking operation.
Added support for processing more than a single packet in
pcap_dispatch().
Fixed bug in loss counter code.
Improved portability of loss counter code (e.g. use UINT_MAX
instead of 0xffff).
Removed unused local variables.
Added required headers (ctype.h, limits.h, unistd.h,
netinet/in.h).
Changed semantics to match those of standard pcap on linux.
- packets rejected by the filter are not counted.