supplying a non-stub version of "pcap_findalldevs()", as a list of
devices won't do any good for a capture program.
Don't bother checking for "ifaddrs.h" unless we have "getifaddrs()" -
and if we have "getifaddrs()" but don't have a usable "ifaddrs.h",
report an error, rather than leaving the error for the compile stage.
that require it, and make pcap_fddipad private to the code generator, as
that's the only place that needs it (ideally, all *its* state should be
local as well). This makes opening an FDDI device, on platforms where
the padding is supplied as part of the packet, and opening other types
of devices or opening savefiles in the same program work better, as you
don't have to be sure you compile the filter for a given pcap_t before
opening the next pcap_t.
we're about to apply the filter, so that if it's changed by a callback
routine, we get the current filter, rather than the one in effect when
we started the loop.
definitions for register atoms together.
A conditional jump uses the X register as well as the A register if it's
comparing the A register against the X register rather than a constant;
handle that case when computing the set of registers used by a block.
with jeq #x and that don't have a subsequent block that uses the value
the block leaves in the A register; make sure we only do them if the
last operation is a jeq with a constant operand and if nothing uses this
block's A register value. (Some were being done with jeq x, and some
were done regardless of the branch that terminated the block and
regardless of whether the block's A register value is being used.)
"pcap_dump_fopen()" to open a pcap_t given a FILE *, and add
"pcap_dump_fopen()" to open a pcap_dumper_t given a FILE *.
On Windows, if we're opening the standard input, put it in binary mode.
Check for errors from "sf_write_header()" and return an error if we get
an error.
Note that the previous checkin should have had the comment
The radiotap header isn't BSD-specific - it's also used by the madwifi
Atheros driver on Linux.
catch the error you get from unpatched OS X when you turn that flag on,
and, if we get that error, turn the flag off and try again. This adapts
to systems that have been patched to make that flag work, and would also
adapt to Apple fixing that bug.
capture file if the standard I/O stream is stdin (i.e., if the file name
was "-"). Thanks to Joshua Blanton <jblanton@masaka.cs.ohiou.edu> for
catching this one.
"uname()" end with "-RELEASE" (or "-CURRENT" or "-STABLE" or...), so
check the first 4 characters of the release number string for the
version number followed by "-".
the first byte (0xff) of the PPP header (0xff03) is tweaked to accomodate
the direction 0x00 = IN, 0x01 = OUT
the DLT_ supports the libpcap tokens "inbound" and "outbound"
fix a comment;
fix references to the send-side file descriptor in
"pcap_open_live()";
"dlrawdatareq()"s caller reports the error - we just return what
"putmsg()" returns, so the caller knows whether there was an
error.