From: Guy Harris Date: Fri, 13 Apr 2012 00:31:29 +0000 (-0700) Subject: Rename some LINKTYPE_ values to make it clearer what they are. X-Git-Tag: libpcap-1.3.0~2 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/b04e3edd27cbd102668e27340e8716f5482487dc Rename some LINKTYPE_ values to make it clearer what they are. Rename LINKTYPE_TOKEN_RING to LINKTYPE_IEEE802_5 to clarify that it applies to IEEE 802.5 token ring, not to other token rings. Give all the 802.11+radio metadata LINKTYPE_ values names that begin with LINKTYPE_IEEE802_11, and rename LINKTYPE_IEEE802_11_RADIO to LINKTYPE_IEEE802_11_RADIOTAP to clarify that it's radiotap. At this point, the radiotap header is what's being adopted for most if not all 802.11 adapters; get rid of the bit about the AVS header being used for that purpose. --- diff --git a/pcap-common.c b/pcap-common.c index 8421e77c..31cf84de 100644 --- a/pcap-common.c +++ b/pcap-common.c @@ -118,7 +118,7 @@ #define LINKTYPE_AX25 DLT_AX25 #define LINKTYPE_PRONET DLT_PRONET #define LINKTYPE_CHAOS DLT_CHAOS -#define LINKTYPE_TOKEN_RING DLT_IEEE802 /* DLT_IEEE802 is used for Token Ring */ +#define LINKTYPE_IEEE802_5 DLT_IEEE802 /* DLT_IEEE802 is used for 802.5 Token Ring */ #define LINKTYPE_ARCNET_BSD DLT_ARCNET /* BSD-style headers */ #define LINKTYPE_SLIP DLT_SLIP #define LINKTYPE_PPP DLT_PPP @@ -193,8 +193,8 @@ #define LINKTYPE_PFLOG 117 /* OpenBSD DLT_PFLOG */ #define LINKTYPE_CISCO_IOS 118 /* For Cisco-internal use */ -#define LINKTYPE_PRISM_HEADER 119 /* 802.11+Prism II monitor mode */ -#define LINKTYPE_AIRONET_HEADER 120 /* FreeBSD Aironet driver stuff */ +#define LINKTYPE_IEEE802_11_PRISM 119 /* 802.11 plus Prism II monitor mode radio metadata header */ +#define LINKTYPE_IEEE802_11_AIRONET 120 /* 802.11 plus FreeBSD Aironet driver radio metadata header */ /* * Reserved for Siemens HiPath HDLC. @@ -212,7 +212,7 @@ #define LINKTYPE_PCI_EXP 125 /* PCI Express */ #define LINKTYPE_AURORA 126 /* Xilinx Aurora link layer */ -#define LINKTYPE_IEEE802_11_RADIO 127 /* 802.11 plus BSD radio header */ +#define LINKTYPE_IEEE802_11_RADIOTAP 127 /* 802.11 plus radiotap radio metadata header */ /* * Reserved for the TZSP encapsulation, as per request from @@ -307,11 +307,8 @@ * including radio information: * * http://www.shaftnet.org/~pizza/software/capturefrm.txt - * - * but could and arguably should also be used by non-AVS Linux - * 802.11 drivers; that may happen in the future. */ -#define LINKTYPE_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ +#define LINKTYPE_IEEE802_11_AVS 163 /* 802.11 plus AVS radio metadata header */ /* * Juniper-private data link type, as per request from @@ -902,7 +899,7 @@ static struct linktype_map { { DLT_AX25, LINKTYPE_AX25 }, { DLT_PRONET, LINKTYPE_PRONET }, { DLT_CHAOS, LINKTYPE_CHAOS }, - { DLT_IEEE802, LINKTYPE_TOKEN_RING }, + { DLT_IEEE802, LINKTYPE_IEEE802_5 }, { DLT_ARCNET, LINKTYPE_ARCNET_BSD }, { DLT_SLIP, LINKTYPE_SLIP }, { DLT_PPP, LINKTYPE_PPP },