diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-24 21:49:39 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-24 21:49:39 +0000 |
commit | a9ef5b897909fa98dcb8f3534b11a5bf990346f7 (patch) | |
tree | 50b01e3fe6dad85b7d582184128a710e0b8bc5da /packet-isl.c | |
parent | c11ba267855ea50bc906d196cc4b16d1b70b0be1 (diff) |
Add the CRC of the encapsulated frame to the ISL dissection.
Fix an error in the handling of non-Ethernet, non-Token Ring frames.
svn path=/trunk/; revision=1543
Diffstat (limited to 'packet-isl.c')
-rw-r--r-- | packet-isl.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packet-isl.c b/packet-isl.c index 8e249679a0..1ea22b37e1 100644 --- a/packet-isl.c +++ b/packet-isl.c @@ -1,7 +1,7 @@ /* packet-isl.c * Routines for Cisco ISL Ethernet header disassembly * - * $Id: packet-isl.c,v 1.2 2000/01/24 19:26:09 guy Exp $ + * $Id: packet-isl.c,v 1.3 2000/01/24 21:49:39 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -61,6 +61,7 @@ static int hf_isl_hsa = -1; static int hf_isl_vlan_id = -1; static int hf_isl_bpdu = -1; static int hf_isl_index = -1; +static int hf_isl_crc = -1; static int hf_isl_src_vlan_id = -1; static int hf_isl_explorer = -1; static int hf_isl_dst_route_descriptor = -1; @@ -191,6 +192,12 @@ dissect_isl(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) pntohs(&pd[offset+20])); proto_tree_add_item(fh_tree, hf_isl_index, offset+22, 2, pntohs(&pd[offset+22])); + + /* Now for the CRC, which is at the *end* of the packet. */ + if (BYTES_ARE_IN_FRAME(END_OF_FRAME - 4, 4)) { + proto_tree_add_item(fh_tree, hf_isl_crc, END_OF_FRAME - 4, 4, + pntohl(&pd[END_OF_FRAME - 4])); + } } switch (type) { @@ -216,7 +223,6 @@ dissect_isl(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) break; default: - offset += 12; /* skip the header */ dissect_data(pd, offset+26, fd, tree); break; } @@ -256,6 +262,9 @@ proto_register_isl(void) { &hf_isl_index, { "Index", "isl.index", FT_UINT16, BASE_DEC, NULL, 0x0, "Port index of packet source" }}, + { &hf_isl_crc, + { "CRC", "isl.crc", FT_UINT32, BASE_HEX, NULL, 0x0, + "CRC field of encapsulated frame" }}, { &hf_isl_src_vlan_id, { "Source VLAN ID", "isl.src_vlan_id", FT_UINT16, BASE_HEX, NULL, 0xFFFE, "Source Virtual LAN ID" }}, |