aboutsummaryrefslogtreecommitdiffstats
path: root/ethertype.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-01-23 08:55:37 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-01-23 08:55:37 +0000
commit9cb57e6407c1ab93c2775e3da8d4cac20f19e5c3 (patch)
tree8647292ca380ae9108970a167959b9df1c931ec9 /ethertype.c
parent02e20af37c3ca0af72d23974424291f760283843 (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1525 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'ethertype.c')
-rw-r--r--ethertype.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ethertype.c b/ethertype.c
index e7012db419..43a3d141a0 100644
--- a/ethertype.c
+++ b/ethertype.c
@@ -2,7 +2,7 @@
* Routines for calling the right protocol for the ethertype.
* This is called by both packet-eth.c (Ethernet II) and packet-llc.c (SNAP)
*
- * $Id: ethertype.c,v 1.25 2000/01/22 06:22:12 guy Exp $
+ * $Id: ethertype.c,v 1.26 2000/01/23 08:55:31 guy Exp $
*
* Gilbert Ramirez <gram@xiexie.org>
*
@@ -57,20 +57,20 @@ const value_string etype_vals[] = {
void
capture_ethertype(guint16 etype, int offset,
- const u_char *pd, guint32 cap_len, packet_counts *ld)
+ const u_char *pd, packet_counts *ld)
{
switch (etype) {
case ETHERTYPE_IP:
- capture_ip(pd, offset, cap_len, ld);
+ capture_ip(pd, offset, ld);
break;
case ETHERTYPE_IPX:
- capture_ipx(pd, offset, cap_len, ld);
+ capture_ipx(pd, offset, ld);
break;
case ETHERTYPE_VLAN:
- capture_vlan(pd, offset, cap_len, ld);
+ capture_vlan(pd, offset, ld);
break;
case ETHERTYPE_VINES:
- capture_vines(pd, offset, cap_len, ld);
+ capture_vines(pd, offset, ld);
break;
default:
ld->other++;