diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-09-17 04:20:23 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-09-17 04:20:23 +0000 |
commit | 7b6a195ea3c76500f0fb6210cb5a1d069c362410 (patch) | |
tree | b7b6b8658dc819cc81ecc917fe9a76c175db43bd /packet-tr.c | |
parent | 182b9f5fe4f0e43506b2ff7aac17e412d019868a (diff) |
Changed short packet handling in TR code to understand minimum-length
TR packets (it's a variable-length header, remember). Added lots of
proto_tree-style fields to TRMAC code.
svn path=/trunk/; revision=683
Diffstat (limited to 'packet-tr.c')
-rw-r--r-- | packet-tr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packet-tr.c b/packet-tr.c index 277595a878..bd782d4686 100644 --- a/packet-tr.c +++ b/packet-tr.c @@ -2,7 +2,7 @@ * Routines for Token-Ring packet disassembly * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-tr.c,v 1.26 1999/09/15 06:26:42 gram Exp $ + * $Id: packet-tr.c,v 1.27 1999/09/17 04:20:22 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -56,6 +56,7 @@ static int hf_tr_rif = -1; static int hf_tr_rif_ring = -1; static int hf_tr_rif_bridge = -1; +#define TR_MIN_HEADER_LEN 14 #define TR_MAX_HEADER_LEN 32 static const value_string ac_vals[] = { @@ -294,7 +295,7 @@ dissect_tr(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { /* Token-Ring Strings */ char *fc[] = { "MAC", "LLC", "Reserved", "Unknown" }; - if (fd->cap_len < TR_MAX_HEADER_LEN) { + if (fd->cap_len < TR_MIN_HEADER_LEN) { dissect_data(pd, offset, fd, tree); return; } |