802.11 support, from Javier Achirica <achirica@ttd.net>.
This commit is contained in:
parent
9f302b1f7f
commit
6cd32e5cef
1
CREDITS
1
CREDITS
|
@ -23,6 +23,7 @@ Additional people who have contributed patches:
|
|||
Greg Troxel <gdt@ir.bbn.com>
|
||||
Igor Khristophorov <igor@atdot.org>
|
||||
Jason R. Thorpe <thorpej@zembu.com>
|
||||
Javier Achirica <achirica@ttd.net>
|
||||
Jefferson Ogata <jogata@nodc.noaa.gov>
|
||||
Juergen Schoenwaelder <schoenw@ibr.cs.tu-bs.de>
|
||||
Klaus Klein <kleink@netbsd.org>
|
||||
|
|
20
gencode.c
20
gencode.c
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.153 2001-05-30 01:27:21 fenner Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.154 2001-06-10 01:11:40 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -654,6 +654,23 @@ init_linktype(type)
|
|||
off_nl = 22;
|
||||
return;
|
||||
|
||||
case DLT_IEEE802_11:
|
||||
/*
|
||||
* 802.11 doesn't really have a link-level type field.
|
||||
* We set "off_linktype" to the offset of the LLC header.
|
||||
*
|
||||
* To check for Ethernet types, we assume that SSAP = SNAP
|
||||
* is being used and pick out the encapsulated Ethernet type.
|
||||
* XXX - should we generate code to check for SNAP?
|
||||
*
|
||||
* XXX - the header is actually variable-length. We
|
||||
* assume a 24-byte link-layer header, as appears in
|
||||
* data frames in networks with no bridges.
|
||||
*/
|
||||
off_linktype = 24;
|
||||
off_nl = 30;
|
||||
return;
|
||||
|
||||
case DLT_ATM_RFC1483:
|
||||
/*
|
||||
* assume routed, non-ISO PDUs
|
||||
|
@ -901,6 +918,7 @@ gen_linktype(proto)
|
|||
}
|
||||
break;
|
||||
|
||||
case DLT_IEEE802_11:
|
||||
case DLT_FDDI:
|
||||
case DLT_IEEE802:
|
||||
case DLT_ATM_RFC1483:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.57 2001-04-09 05:55:40 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.58 2001-06-10 01:11:41 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -656,6 +656,13 @@ static int map_arphrd_to_dlt(pcap_t *handle, int arptype)
|
|||
handle->linktype = DLT_ATM_CLIP;
|
||||
break;
|
||||
|
||||
#ifndef ARPHRD_IEEE80211 /* From Linux 2.4.6 */
|
||||
#define ARPHRD_IEEE80211 801
|
||||
#endif
|
||||
case ARPHRD_IEEE80211:
|
||||
handle->linktype = DLT_IEEE802_11;
|
||||
break;
|
||||
|
||||
case ARPHRD_PPP:
|
||||
/*
|
||||
* Some PPP code in the kernel supplies no link-layer
|
||||
|
|
Reference in New Issue