Reserve a DLT_ value for Frame Relay, and map BSD/OS's DLT_FR to it.
This commit is contained in:
parent
d041ab8109
commit
562499a65d
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.57 2002-06-06 08:57:04 guy Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.58 2002-06-07 04:17:15 guy Exp $ (LBL)
|
||||
*/
|
||||
|
||||
#ifndef BPF_MAJOR_VERSION
|
||||
|
@ -346,6 +346,12 @@ struct bpf_hdr {
|
|||
*/
|
||||
#define DLT_SUNATM 123 /* Solaris+SunATM */
|
||||
|
||||
/*
|
||||
* Reserved for Frame Relay; BSD/OS has a DLT_FR, with a value of 11,
|
||||
* but that collides with other values.
|
||||
*/
|
||||
#define DLT_FRELAY 124
|
||||
|
||||
/*
|
||||
* The instruction encodings.
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.49 2002-05-31 10:59:43 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.50 2002-06-07 04:17:15 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -313,7 +313,7 @@ pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf)
|
|||
break;
|
||||
|
||||
case 11: /*DLT_FR*/
|
||||
v = DLT_RAW; /*XXX*/
|
||||
v = DLT_FRELAY;
|
||||
break;
|
||||
|
||||
case 12: /*DLT_C_HDLC*/
|
||||
|
|
10
savefile.c
10
savefile.c
|
@ -30,7 +30,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.61 2002-06-06 08:57:03 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.62 2002-06-07 04:17:15 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -177,6 +177,7 @@ static const char rcsid[] =
|
|||
#define LINKTYPE_HHDLC 121 /* Siemens HiPath HDLC */
|
||||
#define LINKTYPE_IP_OVER_FC 122 /* RFC 2625 IP-over-Fibre Channel */
|
||||
#define LINKTYPE_SUNATM 123 /* Solaris+SunATM */
|
||||
#define LINKTYPE_FRELAY 124 /* Frame Relay */
|
||||
|
||||
static struct linktype_map {
|
||||
int dlt;
|
||||
|
@ -204,6 +205,10 @@ static struct linktype_map {
|
|||
* have values that should never be equal to any DLT_*
|
||||
* code.
|
||||
*/
|
||||
#ifdef DLT_FR
|
||||
/* BSD/OS Frame Relay */
|
||||
{ DLT_FR, LINKTYPE_FRELAY },
|
||||
#endif
|
||||
{ DLT_ATM_RFC1483, LINKTYPE_ATM_RFC1483 },
|
||||
{ DLT_RAW, LINKTYPE_RAW },
|
||||
{ DLT_SLIP_BSDOS, LINKTYPE_SLIP_BSDOS },
|
||||
|
@ -261,6 +266,9 @@ static struct linktype_map {
|
|||
/* Solaris+SunATM */
|
||||
{ DLT_SUNATM, LINKTYPE_SUNATM },
|
||||
|
||||
/* Frame Relay */
|
||||
{ DLT_FRELAY, LINKTYPE_FRELAY },
|
||||
|
||||
/*
|
||||
* Any platform that defines additional DLT_* codes should:
|
||||
*
|
||||
|
|
Reference in New Issue