diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-23 08:55:37 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-23 08:55:37 +0000 |
commit | 2461d79698e685644e2f07ee46381a092348461c (patch) | |
tree | 8647292ca380ae9108970a167959b9df1c931ec9 /packet-llc.c | |
parent | 42d68156a9599948fb0c5c633efc9d61548d5a5b (diff) | |
download | wireshark-2461d79698e685644e2f07ee46381a092348461c.tar.gz wireshark-2461d79698e685644e2f07ee46381a092348461c.tar.bz2 wireshark-2461d79698e685644e2f07ee46381a092348461c.zip |
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.
svn path=/trunk/; revision=1525
Diffstat (limited to 'packet-llc.c')
-rw-r--r-- | packet-llc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-llc.c b/packet-llc.c index ccf7b19306..b6bca3f384 100644 --- a/packet-llc.c +++ b/packet-llc.c @@ -2,7 +2,7 @@ * Routines for IEEE 802.2 LLC layer * Gilbert Ramirez <gramirez@tivoli.com> * - * $Id: packet-llc.c,v 1.40 2000/01/22 21:49:50 gerald Exp $ + * $Id: packet-llc.c,v 1.41 2000/01/23 08:55:34 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -51,7 +51,7 @@ static int hf_llc_pid = -1; static gint ett_llc = -1; static gint ett_llc_ctrl = -1; -typedef void (capture_func_t)(const u_char *, int, guint32, packet_counts *); +typedef void (capture_func_t)(const u_char *, int, packet_counts *); typedef void (dissect_func_t)(const u_char *, int, frame_data *, proto_tree *); /* The SAP info is split into two tables, one value_string table and one table of sap_info. This is @@ -198,7 +198,7 @@ sap_dissect_func(u_char sap) { } void -capture_llc(const u_char *pd, int offset, guint32 cap_len, packet_counts *ld) { +capture_llc(const u_char *pd, int offset, packet_counts *ld) { int is_snap; guint16 control; @@ -249,11 +249,11 @@ capture_llc(const u_char *pd, int offset, guint32 cap_len, packet_counts *ld) { OUI_ENCAP_ETHER and an Ethernet packet type for AARP packets. */ capture_ethertype(etype, offset+8, pd, - cap_len, ld); + ld); break; case OUI_CISCO: capture_ethertype(etype, - offset + 8, pd, cap_len, ld); + offset + 8, pd, ld); break; default: ld->other++; @@ -272,7 +272,7 @@ capture_llc(const u_char *pd, int offset, guint32 cap_len, packet_counts *ld) { offset += llc_header_len; if (capture) { - capture(pd, offset, cap_len, ld); + capture(pd, offset, ld); } else { ld->other++; |