aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannes <hannes>2007-05-24 23:57:36 +0000
committerhannes <hannes>2007-05-24 23:57:36 +0000
commit666dd96733f16e9269f409d04184a70575bc2ed9 (patch)
treeccc4ad8e8b1bf394cc91038b268898c67ba63fad
parentb9641d7aed9f38d2db75d63034c495deb476eb50 (diff)
add support for DLT_JUNIPER_ISM
-rw-r--r--gencode.c10
-rw-r--r--pcap/bpf.h11
-rw-r--r--savefile.c14
3 files changed, 32 insertions, 3 deletions
diff --git a/gencode.c b/gencode.c
index ee87a50d..5aa24a82 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.277 2007-03-11 04:35:24 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.278 2007-05-24 23:57:36 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -1222,6 +1222,12 @@ init_linktype(p)
off_nl_nosnap = -1;
return;
+ case DLT_JUNIPER_ISM:
+ off_linktype = 8;
+ off_nl = -1;
+ off_nl_nosnap = -1;
+ return;
+
case DLT_MTP2:
off_li = 2;
off_sio = 3;
@@ -2378,6 +2384,7 @@ gen_linktype(proto)
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
case DLT_JUNIPER_VP:
+ case DLT_JUNIPER_ISM:
/* 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
@@ -6215,6 +6222,7 @@ gen_inbound(dir)
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
case DLT_JUNIPER_VP:
+ case DLT_JUNIPER_ISM:
/* 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 0de15a9e..e8bc61b3 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.9 2007-05-04 09:46:55 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.10 2007-05-24 23:57:36 hannes Exp $ (LBL)
*/
/*
@@ -688,6 +688,15 @@ struct bpf_version {
#define DLT_IEEE802_16_MAC_CPS_RADIO 193
/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ is used for internal communication with a
+ * integrated service module (ISM).
+ */
+#define DLT_JUNIPER_ISM 194
+
+
+/*
* The instruction encodings.
*/
/* instruction classes */
diff --git a/savefile.c b/savefile.c
index 7b37beab..54d68c0a 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.155 2007-05-04 09:46:55 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.156 2007-05-24 23:57:36 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -511,6 +511,15 @@ static const char rcsid[] _U_ =
*/
#define LINKTYPE_IEEE802_16_MAC_CPS_RADIO 193
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.
+ * The DLT_ is used for internal communication with a
+ * integrated service module (ISM).
+ */
+#define LINKTYPE_JUNIPER_ISM 194
+
+
static struct linktype_map {
int dlt;
int linktype;
@@ -752,6 +761,9 @@ static struct linktype_map {
/* IEEE 802.15 MAC Common Part Sublayer plus radiotap header */
{ DLT_IEEE802_16_MAC_CPS_RADIO, LINKTYPE_IEEE802_16_MAC_CPS_RADIO },
+ /* Juniper Voice ISM */
+ { DLT_JUNIPER_ISM, LINKTYPE_JUNIPER_ISM },
+
{ -1, -1 }
};