guy 2000/01/23 02:55:48 CST
Modified files:
. capture.c ethertype.c packet-clip.c
packet-eth.c packet-fddi.c packet-ip.c
packet-ipx.c packet-llc.c
packet-netbios.c packet-null.c
packet-ppp.c packet-raw.c packet-tr.c
packet-vines.c packet-vlan.c packet.h
Log:
In "dissect_eth()", update "pi.len" and "pi.captured_len" regardless of
whether we're building a protocol tree or not.
Make "dissect_eth()" use "BYTES_ARE_IN_FRAME()" to see if we have a full
Ethernet header - it can be called with a non-zero offset, if Ethernet
frames are encapsulated inside other frames (e.g., ATM LANE).
Make capture routines take an "offset" argument if the corresponding
dissect routine takes one (for symmetry, and for Cisco ISL or any other
protocol that encapsulates Ethernet or Token-Ring frames inside other
frames).
Pass the frame lengths to capture routines via the "pi" structure,
rather than as an in-line argument, so that they can macros such as
"BYTES_ARE_IN_FRAME()" the way the corresponding dissect routines do.
Make capture routines update "pi.len" and "pi.captured_len" the same way
the corresponding diseect routines do, if the capture routines then call
other capture routines.
Make "capture_vlan()" count as "other" frames that are too short, the
way other capture routines do.
Revision Changes Path
1.91 +13 -7 ethereal/capture.c
1.26 +6 -6 ethereal/ethertype.c
1.4 +3 -3 ethereal/packet-clip.c
1.26 +39 -28 ethereal/packet-eth.c
1.26 +6 -5 ethereal/packet-fddi.c
1.70 +6 -2 ethereal/packet-ip.c
1.47 +2 -2 ethereal/packet-ipx.c
1.41 +6 -6 ethereal/packet-llc.c
1.14 +2 -3 ethereal/packet-netbios.c
1.18 +5 -5 ethereal/packet-null.c
1.25 +5 -5 ethereal/packet-ppp.c
1.12 +4 -4 ethereal/packet-raw.c
1.34 +5 -7 ethereal/packet-tr.c
1.12 +2 -2 ethereal/packet-vines.c
1.7 +6 -5 ethereal/packet-vlan.c
1.167 +17 -18 ethereal/packet.h