diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-03-19 05:22:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-03-19 05:22:41 +0000 |
commit | b9ab8062143c4baf34112e6a6fba374f406753b9 (patch) | |
tree | eab89269389a3bcdc516fe1f1a7f8756cc5c50cf /wiretap/libpcap.c | |
parent | 7b9f101a4a7bb4a1b6754966ec4c4579f85c4238 (diff) |
In the read routine, set the 802.11 pseudo-header for
WTAP_ENCAP_PRISM_HEADER, WTAP_ENCAP_IEEE_802_11_WLAN_BSD, and
WTAP_ENCAP_IEEE_802_11_WLAN_AVS.
In the seek_read routine, set it for all 802.11 types.
svn path=/trunk/; revision=10404
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r-- | wiretap/libpcap.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index 81d13e8124..89fa2a69b7 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1,6 +1,6 @@ /* libpcap.c * - * $Id: libpcap.c,v 1.117 2004/03/11 09:18:32 guy Exp $ + * $Id: libpcap.c,v 1.118 2004/03/19 05:22:41 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -1146,6 +1146,9 @@ static gboolean libpcap_read(wtap *wth, int *err, gchar **err_info, break; case WTAP_ENCAP_IEEE_802_11: + case WTAP_ENCAP_PRISM_HEADER: + case WTAP_ENCAP_IEEE_802_11_WLAN_BSD: + case WTAP_ENCAP_IEEE_802_11_WLAN_AVS: /* * We don't know whether there's an FCS in this frame or not. * XXX - are there any OSes where the capture mechanism @@ -1256,6 +1259,18 @@ libpcap_seek_read(wtap *wth, long seek_off, pseudo_header->eth.fcs_len = -1; break; + case WTAP_ENCAP_IEEE_802_11: + case WTAP_ENCAP_PRISM_HEADER: + case WTAP_ENCAP_IEEE_802_11_WLAN_BSD: + case WTAP_ENCAP_IEEE_802_11_WLAN_AVS: + /* + * We don't know whether there's an FCS in this frame or not. + * XXX - are there any OSes where the capture mechanism + * supplies an FCS? + */ + pseudo_header->ieee_802_11.fcs_len = -1; + break; + case WTAP_ENCAP_IRDA: if (!libpcap_read_irda_pseudoheader(wth->random_fh, pseudo_header, err, err_info)) { |