summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2002-06-07 04:17:55 +0000
committerguy <guy>2002-06-07 04:17:55 +0000
commitf2b787596ecd9110358175ab5ae417cc654d0c7a (patch)
treef093241841deac2fb3c5b1df5489f7902095bb46
parent6ac1cb4faf1031f53e5ae2da4fd625e0263e27ec (diff)
downloadlibpcap-f2b787596ecd9110358175ab5ae417cc654d0c7a.tar.gz
Reserve a DLT_ value for Frame Relay, and map BSD/OS's DLT_FR to it.
-rw-r--r--bpf/net/bpf.h8
-rw-r--r--pcap-bpf.c4
-rw-r--r--savefile.c10
3 files changed, 18 insertions, 4 deletions
diff --git a/bpf/net/bpf.h b/bpf/net/bpf.h
index 8e2f5d5a..9d791976 100644
--- a/bpf/net/bpf.h
+++ b/bpf/net/bpf.h
@@ -37,7 +37,7 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.52.2.4 2002-06-06 08:57:43 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.52.2.5 2002-06-07 04:17:57 guy Exp $ (LBL)
*/
#ifndef BPF_MAJOR_VERSION
@@ -347,6 +347,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.
*/
/* instruction classes */
diff --git a/pcap-bpf.c b/pcap-bpf.c
index 1708d813..c15bcff4 100644
--- a/pcap-bpf.c
+++ b/pcap-bpf.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.48.2.1 2002-05-31 11:00:10 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.48.2.2 2002-06-07 04:17:55 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*/
diff --git a/savefile.c b/savefile.c
index f38291d6..f5304689 100644
--- a/savefile.c
+++ b/savefile.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.55.2.5 2002-06-06 08:57:43 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.55.2.6 2002-06-07 04:17:56 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:
*