The DLT_ value 127 is being used for the BSD radio header, and the

current CVS libpcap uses 163 for the AVS radio header (127 was never
used for the AVS radio header).  Redo the Wiretap encapsulation values
for that (and shuffle them to put the 802.11 Wiretap values together).

svn path=/trunk/; revision=9904
This commit is contained in:
Guy Harris 2004-01-29 10:58:28 +00:00
parent ff641180dd
commit cf131d9e16
5 changed files with 62 additions and 55 deletions

View File

@ -1,6 +1,6 @@
/* packet-tzsp.c
*
* $Id: packet-tzsp.c,v 1.5 2003/12/15 00:08:57 guy Exp $
* $Id: packet-tzsp.c,v 1.6 2004/01/29 10:58:28 guy Exp $
*
* Copyright 2002, Tazmen Technologies Inc
*
@ -82,12 +82,13 @@ static int hf_sensormac = -1;
/* ************************************************************************* */
/* Encapsulation type values */
/* Note that these are not all the same as DLT_ values */
/* ************************************************************************* */
#define TZSP_ENCAP_ETHERNET 1
#define TZSP_ENCAP_IEEE_802_11 18
#define TZSP_ENCAP_PRISM_HEADER 119
#define TZSP_ENCAP_WLAN_HEADER 127
#define TZSP_ENCAP_WLAN_AVS 127
/* ************************************************************************* */
/* Generic header options */
@ -254,7 +255,7 @@ struct encap_map {
static const struct encap_map map_table[] = {
{ TZSP_ENCAP_ETHERNET, WTAP_ENCAP_ETHERNET },
{ TZSP_ENCAP_PRISM_HEADER, WTAP_ENCAP_PRISM_HEADER },
{ TZSP_ENCAP_WLAN_HEADER, WTAP_ENCAP_WLAN_HEADER },
{ TZSP_ENCAP_WLAN_AVS, WTAP_ENCAP_IEEE_802_11_WLAN_AVS },
{ TZSP_ENCAP_IEEE_802_11, WTAP_ENCAP_IEEE_802_11 },
{ 0, -1 }
};

View File

@ -10,7 +10,7 @@
*
* By Solomon Peachy
*
* $Id: packet-wlancap.c,v 1.3 2003/12/04 05:59:35 gram Exp $
* $Id: packet-wlancap.c,v 1.4 2004/01/29 10:58:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -280,5 +280,5 @@ proto_reg_handoff_wlancap(void)
wlancap_handle = create_dissector_handle(dissect_wlancap, proto_wlancap);
dissector_add("wtap_encap", WTAP_ENCAP_WLAN_HEADER, wlancap_handle);
dissector_add("wtap_encap", WTAP_ENCAP_IEEE_802_11_WLAN_AVS, wlancap_handle);
}

View File

@ -1,6 +1,6 @@
/* libpcap.c
*
* $Id: libpcap.c,v 1.110 2004/01/28 01:24:29 guy Exp $
* $Id: libpcap.c,v 1.111 2004/01/29 10:58:28 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -270,7 +270,7 @@ static const struct {
{ 121, WTAP_ENCAP_HHDLC }, /* HiPath HDLC */
{ 122, WTAP_ENCAP_IP_OVER_FC }, /* RFC 2625 IP-over-FC */
{ 123, WTAP_ENCAP_ATM_PDUS }, /* SunATM */
{ 127, WTAP_ENCAP_WLAN_HEADER }, /* 802.11 plus WLAN header */
{ 127, WTAP_ENCAP_IEEE_802_11_WLAN_BSD }, /* 802.11 plus BSD WLAN header */
{ 128, WTAP_ENCAP_TZSP }, /* Tazmen Sniffer Protocol */
{ 129, WTAP_ENCAP_ARCNET_LINUX },
@ -306,6 +306,8 @@ static const struct {
{ 161, WTAP_ENCAP_USER14 },
{ 162, WTAP_ENCAP_USER15 },
{ 163, WTAP_ENCAP_IEEE_802_11_WLAN_AVS }, /* 802.11 plus AVS WLAN header */
/*
* To repeat:
*

View File

@ -1,6 +1,6 @@
/* wtap.c
*
* $Id: wtap.c,v 1.88 2004/01/28 01:24:29 guy Exp $
* $Id: wtap.c,v 1.89 2004/01/29 10:58:28 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -122,9 +122,18 @@ static const struct encap_type_info {
/* WTAP_ENCAP_IEEE_802_11 */
{ "IEEE 802.11 Wireless LAN", "ieee-802-11" },
/* WTAP_ENCAP_PRISM_HEADER */
{ "IEEE 802.11 plus Prism II monitor mode header", "prism" },
/* WTAP_ENCAP_IEEE_802_11_WITH_RADIO */
{ "IEEE 802.11 Wireless LAN with radio information", "ieee-802-11-radio" },
/* WTAP_ENCAP_IEEE_802_11_WLAN_BSD */
{ "IEEE 802.11 plus BSD WLAN header", "ieee-802-11-bsd" },
/* WTAP_ENCAP_IEEE_802_11_WLAN_AVS */
{ "IEEE 802.11 plus AVS WLAN header", "ieee-802-11-avs" },
/* WTAP_ENCAP_SLL */
{ "Linux cooked-mode capture", "linux-sll" },
@ -143,9 +152,6 @@ static const struct encap_type_info {
/* WTAP_ENCAP_LOCALTALK */
{ "Localtalk", "ltalk" },
/* WTAP_ENCAP_PRISM_HEADER */
{ "IEEE 802.11 plus Prism II monitor mode header", "prism" },
/* WTAP_ENCAP_OLD_PFLOG */
{ "OpenBSD PF Firewall logs, pre-3.4", "pflog-old" },
@ -158,9 +164,6 @@ static const struct encap_type_info {
/* WTAP_ENCAP_COSINE */
{ "CoSine L2 debug log", "cosine" },
/* WTAP_ENCAP_WLAN_HEADER */
{ "IEEE 802.11 plus AVS WLAN monitor header", "wlan" },
/* WTAP_ENCAP_WFLEET_HDLC */
{ "Wellfleet HDLC", "whdlc" },

View File

@ -1,6 +1,6 @@
/* wtap.h
*
* $Id: wtap.h,v 1.150 2004/01/28 01:24:30 guy Exp $
* $Id: wtap.h,v 1.151 2004/01/29 10:58:28 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -110,48 +110,49 @@
#define WTAP_ENCAP_IP_OVER_FC 18
#define WTAP_ENCAP_PPP_WITH_PHDR 19
#define WTAP_ENCAP_IEEE_802_11 20
#define WTAP_ENCAP_IEEE_802_11_WITH_RADIO 21
#define WTAP_ENCAP_SLL 22
#define WTAP_ENCAP_FRELAY 23
#define WTAP_ENCAP_FRELAY_WITH_PHDR 24
#define WTAP_ENCAP_CHDLC 25
#define WTAP_ENCAP_CISCO_IOS 26
#define WTAP_ENCAP_LOCALTALK 27
#define WTAP_ENCAP_PRISM_HEADER 28
#define WTAP_ENCAP_OLD_PFLOG 29
#define WTAP_ENCAP_HHDLC 30
#define WTAP_ENCAP_DOCSIS 31
#define WTAP_ENCAP_COSINE 32
#define WTAP_ENCAP_WLAN_HEADER 33
#define WTAP_ENCAP_WFLEET_HDLC 34
#define WTAP_ENCAP_SDLC 35
#define WTAP_ENCAP_TZSP 36
#define WTAP_ENCAP_ENC 37
#define WTAP_ENCAP_PFLOG 38
#define WTAP_ENCAP_CHDLC_WITH_PHDR 39
#define WTAP_ENCAP_BLUETOOTH_H4 40
#define WTAP_ENCAP_MTP2 41
#define WTAP_ENCAP_MTP3 42
#define WTAP_ENCAP_IRDA 43
#define WTAP_ENCAP_USER0 44
#define WTAP_ENCAP_USER1 45
#define WTAP_ENCAP_USER2 46
#define WTAP_ENCAP_USER3 47
#define WTAP_ENCAP_USER4 48
#define WTAP_ENCAP_USER5 49
#define WTAP_ENCAP_USER6 50
#define WTAP_ENCAP_USER7 51
#define WTAP_ENCAP_USER8 52
#define WTAP_ENCAP_USER9 53
#define WTAP_ENCAP_USER10 54
#define WTAP_ENCAP_USER11 55
#define WTAP_ENCAP_USER12 56
#define WTAP_ENCAP_USER13 57
#define WTAP_ENCAP_USER14 58
#define WTAP_ENCAP_USER15 59
#define WTAP_ENCAP_PRISM_HEADER 21
#define WTAP_ENCAP_IEEE_802_11_WITH_RADIO 22
#define WTAP_ENCAP_IEEE_802_11_WLAN_BSD 23
#define WTAP_ENCAP_IEEE_802_11_WLAN_AVS 24
#define WTAP_ENCAP_SLL 25
#define WTAP_ENCAP_FRELAY 26
#define WTAP_ENCAP_FRELAY_WITH_PHDR 27
#define WTAP_ENCAP_CHDLC 28
#define WTAP_ENCAP_CISCO_IOS 29
#define WTAP_ENCAP_LOCALTALK 30
#define WTAP_ENCAP_OLD_PFLOG 31
#define WTAP_ENCAP_HHDLC 32
#define WTAP_ENCAP_DOCSIS 33
#define WTAP_ENCAP_COSINE 34
#define WTAP_ENCAP_WFLEET_HDLC 35
#define WTAP_ENCAP_SDLC 36
#define WTAP_ENCAP_TZSP 37
#define WTAP_ENCAP_ENC 38
#define WTAP_ENCAP_PFLOG 39
#define WTAP_ENCAP_CHDLC_WITH_PHDR 40
#define WTAP_ENCAP_BLUETOOTH_H4 41
#define WTAP_ENCAP_MTP2 42
#define WTAP_ENCAP_MTP3 43
#define WTAP_ENCAP_IRDA 44
#define WTAP_ENCAP_USER0 45
#define WTAP_ENCAP_USER1 46
#define WTAP_ENCAP_USER2 47
#define WTAP_ENCAP_USER3 48
#define WTAP_ENCAP_USER4 49
#define WTAP_ENCAP_USER5 50
#define WTAP_ENCAP_USER6 51
#define WTAP_ENCAP_USER7 52
#define WTAP_ENCAP_USER8 53
#define WTAP_ENCAP_USER9 54
#define WTAP_ENCAP_USER10 55
#define WTAP_ENCAP_USER11 56
#define WTAP_ENCAP_USER12 57
#define WTAP_ENCAP_USER13 58
#define WTAP_ENCAP_USER14 59
#define WTAP_ENCAP_USER15 60
/* last WTAP_ENCAP_ value + 1 */
#define WTAP_NUM_ENCAP_TYPES 60
#define WTAP_NUM_ENCAP_TYPES 61
/* File types that can be read by wiretap.
We support writing some many of these file types, too, so we