aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannes <hannes>2006-05-18 08:40:52 +0000
committerhannes <hannes>2006-05-18 08:40:52 +0000
commitb7d2f597d1ab4223c9700808c96de1342cd33c8d (patch)
tree3e842276c6256efe5941c405e93b135c06d561c9
parent13a838cb485f0bad558dfa9359601175d3353dd5 (diff)
add support for DLT_JUNIPER_VP
-rw-r--r--gencode.c10
-rw-r--r--pcap-bpf.h11
-rw-r--r--pcap.c3
-rw-r--r--savefile.c13
4 files changed, 33 insertions, 4 deletions
diff --git a/gencode.c b/gencode.c
index 41c29020..d7b704a9 100644
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.266 2006-03-16 08:46:13 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.267 2006-05-18 08:40:52 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -1191,6 +1191,12 @@ init_linktype(p)
off_nl_nosnap = -1; /* no 802.2 LLC */
return;
+ case DLT_JUNIPER_VP:
+ off_linktype = 18;
+ off_nl = -1;
+ off_nl_nosnap = -1;
+ return;
+
case DLT_MTP2:
off_sio = 3;
off_opc = 4;
@@ -2296,6 +2302,7 @@ gen_linktype(proto)
case DLT_JUNIPER_PPP:
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
+ case DLT_JUNIPER_VP:
/* just lets verify the magic number for now -
* on ATM we may have up to 6 different encapsulations on the wire
* and need a lot of heuristics to figure out that the payload
@@ -6115,6 +6122,7 @@ gen_inbound(dir)
case DLT_JUNIPER_PPP:
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
+ case DLT_JUNIPER_VP:
/* juniper flags (including direction) are stored
* the byte after the 3-byte magic number */
if (dir) {
diff --git a/pcap-bpf.h b/pcap-bpf.h
index e91b2f59..8b57de9d 100644
--- a/pcap-bpf.h
+++ b/pcap-bpf.h
@@ -37,7 +37,7 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.41 2005-12-13 13:41:39 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.42 2006-05-18 08:40:52 hannes Exp $ (LBL)
*/
/*
@@ -611,6 +611,15 @@ struct bpf_version {
#define DLT_MFR 182
/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ is used for internal communication with a
+ * voice Adapter Card (PIC)
+ */
+#define DLT_JUNIPER_VP 183
+
+
+/*
* The instruction encodings.
*/
/* instruction classes */
diff --git a/pcap.c b/pcap.c
index 69a18329..aed7f127 100644
--- a/pcap.c
+++ b/pcap.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.98 2006-01-22 20:11:26 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.99 2006-05-18 08:40:52 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -380,6 +380,7 @@ static struct dlt_choice dlt_choices[] = {
DLT_CHOICE(DLT_JUNIPER_FRELAY, "Juniper Frame Relay"),
DLT_CHOICE(DLT_JUNIPER_CHDLC, "Juniper C-HDLC"),
DLT_CHOICE(DLT_MFR, "FRF.16 Frame Relay"),
+ DLT_CHOICE(DLT_JUNIPER_VP, "Juniper Voice PIC"),
DLT_CHOICE_SENTINEL
};
diff --git a/savefile.c b/savefile.c
index 4817a9c7..e249d92c 100644
--- a/savefile.c
+++ b/savefile.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.141 2005-12-13 13:41:39 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.142 2006-05-18 08:40:52 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -435,6 +435,14 @@ static const char rcsid[] _U_ =
*/
#define LINKTYPE_MFR 182
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ is used for internal communication with a
+ * voice Adapter Card (PIC)
+ */
+#define LINKTYPE_JUNIPER_VP 183
+
static struct linktype_map {
int dlt;
int linktype;
@@ -643,6 +651,9 @@ static struct linktype_map {
/* Multi Link Frame Relay (FRF.16) */
{ DLT_MFR, LINKTYPE_MFR },
+ /* Juniper Voice PIC */
+ { DLT_JUNIPER_VP, LINKTYPE_JUNIPER_VP },
+
{ -1, -1 }
};