If the DAG API supports asking a card for the set of ERF types
it supports, use that capability, to handle cards that support
multiple ERF types. This is to support channelised/fractional
T1/E1.
Don't set the snapshot length - some DAG cards support multiple
capture streams, but the snapshot length is global, so it'd
affect other captures.
Update README.dag.
"getsockopt()" argument, return those statistics, rather than falling
through and returning the statistics the way we would if
PACKET_STATISTICS weren't supported.
lacking it, so use it in some other cases, instead of duplicating its
functionality.
Check, however, whether it succeeds, and fail appropriately when it
fails.
Also, when other mallocs fails, free up any memory allocated for data
structures, so it doesn't leak.
packets (based on the Ethernet type). "pppoes" has the side-effect that
subsequent filter expressions will test the PPP header and headers
in the PPP payload, not the link-layer header and headers in the
link-layer payload.
so that it's not EBUSY if we didn't get an EBUSY in a
DL_ERROR_ACK/DL_SYSERR reply, and our checks for EBUSY only catch that
case.
If we *did* get EBUSY on all the SAPs we tried, supply an error.
Make "dl_dohpuxbind()" always return a value, so we don't fall off the
end and return an error indication by accident.
to -1, set a "we're doing MPLS" flag, and check that flag rather than
checking for an off_linktype of -1; off_linktype can be -1 for reasons
having nothing to do with MPLS (e.g., a DLT_ of DLT_RAW), and those
should be handled as they have traditionally been.
Rename "gen_null()" to "gen_mpls_linktype()" to make it clearer what it
does (it checks the MPLS stack as well as the IP header).
instruction as an unsigned value, and, at least for comparisons, the
value is converted to unsigned anyway, as the A and X registers are
unsigned, and the Usual Arithmetic Conversions of C89 apply to
comparisons. Make ours unsigned as well. (On two's complement machines
- which means all machines we support - that won't be an issue for using
the constant field as an offset, either, as arithmetic in the BPF
virtual machine is 32-bit two's complement.)
centralize the MPLS check into gen_linktype() and backout the
specific checks in gen_proto_abrev(), gen_proto(), gen_host()
this adds as a by-product support for IPv6
values for an HDLC link (MTP2 is what's usually run on those links, with
MTP3 atop it); remove them. Also, boost dlt_count to match the number
of DLT_ values.