diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-10-01 07:11:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-10-01 07:11:49 +0000 |
commit | be2736adcf8ac583c2d56e37db9ef01f391913f9 (patch) | |
tree | defd8c4db6a77dd4d288de2b0b10f39d6c701b73 /packet-ieee8023.c | |
parent | 44bb98184df93ebb56b5dce5dbd1deb6f37d716a (diff) | |
download | wireshark-be2736adcf8ac583c2d56e37db9ef01f391913f9.tar.gz |
Have a pseudo-header for Ethernet packets, giving the size of the FCS -
0 means "there is no FCS in the packet data", 4 means "there is an FCS
in the packet data", -1 means "I don't know whether there's an FCS in
the packet data, guess based on the packet size".
Assume that Ethernet encapsulated inside other protocols has no FCS, by
having the "eth" dissector assume that (and not check for an Ethernet
pseudo-header).
Have "ethertype()" take an argument giving the FCS size; pass 0 when
appropriate.
Fix up Wiretap routines to set the pseudo-header. This means we no
longer use the "generic" seek-and-read routine, so get rid of it.
svn path=/trunk/; revision=8574
Diffstat (limited to 'packet-ieee8023.c')
-rw-r--r-- | packet-ieee8023.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packet-ieee8023.c b/packet-ieee8023.c index 3822bcf8bf..0fd484f988 100644 --- a/packet-ieee8023.c +++ b/packet-ieee8023.c @@ -1,7 +1,7 @@ /* packet-ieee8023.c * Routine for dissecting 802.3 (as opposed to D/I/X Ethernet) packets. * - * $Id: packet-ieee8023.c,v 1.5 2003/08/21 21:05:30 guy Exp $ + * $Id: packet-ieee8023.c,v 1.6 2003/10/01 07:11:44 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -37,7 +37,8 @@ static dissector_handle_t llc_handle; void dissect_802_3(int length, gboolean is_802_2, tvbuff_t *tvb, int offset_after_length, packet_info *pinfo, proto_tree *tree, - proto_tree *fh_tree, int length_id, int trailer_id) + proto_tree *fh_tree, int length_id, int trailer_id, + int fcs_len) { tvbuff_t *volatile next_tvb; tvbuff_t *volatile trailer_tvb; @@ -87,7 +88,7 @@ dissect_802_3(int length, gboolean is_802_2, tvbuff_t *tvb, } CATCH2(BoundsError, ReportedBoundsError) { /* Well, somebody threw an exception. Add the trailer, if appropriate. */ - add_ethernet_trailer(fh_tree, trailer_id, tvb, trailer_tvb); + add_ethernet_trailer(fh_tree, trailer_id, tvb, trailer_tvb, fcs_len); /* Rethrow the exception, so the "Short Frame" or "Mangled Frame" indication can be put into the tree. */ @@ -98,7 +99,7 @@ dissect_802_3(int length, gboolean is_802_2, tvbuff_t *tvb, } ENDTRY; - add_ethernet_trailer(fh_tree, trailer_id, tvb, trailer_tvb); + add_ethernet_trailer(fh_tree, trailer_id, tvb, trailer_tvb, fcs_len); } void |