aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/radcom.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-10-01 07:11:49 +0000
committerGuy Harris <guy@alum.mit.edu>2003-10-01 07:11:49 +0000
commitbe2736adcf8ac583c2d56e37db9ef01f391913f9 (patch)
treedefd8c4db6a77dd4d288de2b0b10f39d6c701b73 /wiretap/radcom.c
parent44bb98184df93ebb56b5dce5dbd1deb6f37d716a (diff)
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 'wiretap/radcom.c')
-rw-r--r--wiretap/radcom.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/wiretap/radcom.c b/wiretap/radcom.c
index a2ac904c66..64ad916c0e 100644
--- a/wiretap/radcom.c
+++ b/wiretap/radcom.c
@@ -1,6 +1,6 @@
/* radcom.c
*
- * $Id: radcom.c,v 1.41 2003/01/07 08:41:23 guy Exp $
+ * $Id: radcom.c,v 1.42 2003/10/01 07:11:48 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -316,6 +316,11 @@ static gboolean radcom_read(wtap *wth, int *err, long *data_offset)
switch (wth->file_encap) {
+ case WTAP_ENCAP_ETHERNET:
+ /* XXX - is there an FCS? */
+ wth->pseudo_header.eth.fcs_len = -1;
+ break;
+
case WTAP_ENCAP_LAPB:
wth->pseudo_header.x25.flags = (hdr.dce & 0x1) ?
0x00 : FROM_DCE;
@@ -389,6 +394,11 @@ radcom_seek_read(wtap *wth, long seek_off,
switch (wth->file_encap) {
+ case WTAP_ENCAP_ETHERNET:
+ /* XXX - is there an FCS? */
+ pseudo_header->eth.fcs_len = -1;
+ break;
+
case WTAP_ENCAP_LAPB:
pseudo_header->x25.flags = (hdr.dce & 0x1) ? 0x00 : FROM_DCE;
break;