aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ethertype.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-11-20 21:59:18 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-11-20 21:59:18 +0000
commit93bdfea13eb69582c481bcbb5c59cf90f3004144 (patch)
treeae3c72a5204d6498a7f2957738be88615f89a115 /packet-ethertype.c
parent960baf0e34e0de2c339e051afe1e411bd4595f89 (diff)
Make the capture routines take an additional argument giving the amount
of packet data captured. Make the "BYTES_ARE_IN_FRAME()" macro take a "captured length of the packet" argument. Add some length checks to capture routines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4235 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ethertype.c')
-rw-r--r--packet-ethertype.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/packet-ethertype.c b/packet-ethertype.c
index f4cd0f2ba4..42b5860ab0 100644
--- a/packet-ethertype.c
+++ b/packet-ethertype.c
@@ -1,14 +1,13 @@
/* ethertype.c
* Routines for calling the right protocol for the ethertype.
*
- * $Id: packet-ethertype.c,v 1.20 2001/11/13 23:55:29 gram Exp $
+ * $Id: packet-ethertype.c,v 1.21 2001/11/20 21:59:12 guy Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -100,21 +99,21 @@ static void add_trailer(proto_tree *fh_tree, int trailer_id, tvbuff_t *tvb,
tvbuff_t *next_tvb, int offset_after_etype, guint length_before);
void
-capture_ethertype(guint16 etype, int offset,
- const u_char *pd, packet_counts *ld)
+capture_ethertype(guint16 etype, const u_char *pd, int offset, int len,
+ packet_counts *ld)
{
switch (etype) {
case ETHERTYPE_IP:
- capture_ip(pd, offset, ld);
+ capture_ip(pd, offset, len, ld);
break;
case ETHERTYPE_IPX:
- capture_ipx(pd, offset, ld);
+ capture_ipx(pd, offset, len, ld);
break;
case ETHERTYPE_VLAN:
- capture_vlan(pd, offset, ld);
+ capture_vlan(pd, offset, len, ld);
break;
case ETHERTYPE_VINES:
- capture_vines(pd, offset, ld);
+ capture_vines(pd, offset, len, ld);
break;
default:
ld->other++;