revision 1.266
date: 2006-03-16 08:46:13 +0000; author: hannes; state: Exp; lines: +3 -5
use gen_linktype() rather than a plain gen_cmp() for creating
the link-layer specific match code for MPLS packets
revision 1.265
date: 2006-03-16 08:42:14 +0000; author: hannes; state: Exp; lines: +3 -2
OR_PACKET should match at the beginning of the packet and not at
the beginning of the packet plus variable-length link-layer
Make gen_load_llrel() add in off_ll if there isn't a variable-length
radio header, so the offset passed to it is always relative to the
beginning of the link-layer header, not the beginning of the packet.
Don't add in off_ll when calling it.
Those changes centralize the addition of off_ll, so it's only done in
one place (rather than twice, where it was done before, meaning that the
offsets were wrong for the Prism and AVS headers as they had 2*off_ll
rather than just off_ll, as off_ll was added twice).
packets that didn't arrive on that interface, so packets from other
interfaces that get onto the socket queue before we bind the socket to
the interface don't get supplied to the application (binding the socket
doesn't discard incoming packets).
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).