aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tr.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-11-20 21:59:18 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-20 21:59:18 +0000
commite8d4f4f0ac7481c316b3e25a41b1cc747440220e (patch)
treeae3c72a5204d6498a7f2957738be88615f89a115 /packet-tr.c
parent62490b8fdb16d066581c40405cb0d8484248fb09 (diff)
downloadwireshark-e8d4f4f0ac7481c316b3e25a41b1cc747440220e.tar.gz
wireshark-e8d4f4f0ac7481c316b3e25a41b1cc747440220e.tar.bz2
wireshark-e8d4f4f0ac7481c316b3e25a41b1cc747440220e.zip
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. svn path=/trunk/; revision=4235
Diffstat (limited to 'packet-tr.c')
-rw-r--r--packet-tr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-tr.c b/packet-tr.c
index 5c65ea5446..5c2b250628 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-tr.c,v 1.64 2001/11/13 23:55:30 gram Exp $
+ * $Id: packet-tr.c,v 1.65 2001/11/20 21:59:13 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -179,7 +179,7 @@ static void
add_ring_bridge_pairs(int rcf_len, tvbuff_t*, proto_tree *tree);
void
-capture_tr(const u_char *pd, int offset, packet_counts *ld) {
+capture_tr(const u_char *pd, int offset, int len, packet_counts *ld) {
int source_routed = 0;
int frame_type;
@@ -192,7 +192,7 @@ capture_tr(const u_char *pd, int offset, packet_counts *ld) {
guint8 trn_fc; /* field control field */
const guint8 *trn_shost; /* source host */
- if (!BYTES_ARE_IN_FRAME(offset, TR_MIN_HEADER_LEN)) {
+ if (!BYTES_ARE_IN_FRAME(offset, len, TR_MIN_HEADER_LEN)) {
ld->other++;
return;
}
@@ -284,7 +284,7 @@ capture_tr(const u_char *pd, int offset, packet_counts *ld) {
ld->other++;
break;
case 1:
- capture_llc(pd, offset, ld);
+ capture_llc(pd, offset, len, ld);
break;
default:
/* non-MAC, non-LLC, i.e., "Reserved" */