]> The Tcpdump Group git mirrors - libpcap/commitdiff
add some more Juniper proprietary DLTs and LINKTYPEs,
authorHannes Gredler <[email protected]>
Wed, 9 Feb 2011 08:09:27 +0000 (09:09 +0100)
committerHannes Gredler <[email protected]>
Wed, 9 Feb 2011 08:09:27 +0000 (09:09 +0100)
in order to prevent clashes with the public.

gencode.c
pcap-common.c
pcap.c
pcap/bpf.h

index b94ea7291f002b9385a61bdd38fba45d7f869232..9cef425d9e8f45b17dd4481a9e7da1cfdc8af68d 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -1366,6 +1366,15 @@ init_linktype(p)
                off_nl_nosnap = -1;
                return;
 
+       case DLT_JUNIPER_VS:
+       case DLT_JUNIPER_SRX_E2E:
+       case DLT_JUNIPER_FIBRECHANNEL:
+               off_linktype = 8;
+               off_macpl = -1;
+               off_nl = -1;
+               off_nl_nosnap = -1;
+               return;
+
        case DLT_MTP2:
                off_li = 2;
                off_sio = 3;
@@ -3472,6 +3481,10 @@ gen_linktype(proto)
         case DLT_JUNIPER_VP:
         case DLT_JUNIPER_ST:
         case DLT_JUNIPER_ISM:
+        case DLT_JUNIPER_VS:
+        case DLT_JUNIPER_SRX_E2E:
+        case DLT_JUNIPER_FIBRECHANNEL:
+
                /* 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
@@ -7674,6 +7687,10 @@ gen_inbound(dir)
         case DLT_JUNIPER_VP:
         case DLT_JUNIPER_ST:
         case DLT_JUNIPER_ISM:
+        case DLT_JUNIPER_VS:
+        case DLT_JUNIPER_SRX_E2E:
+        case DLT_JUNIPER_FIBRECHANNEL:
+
                /* juniper flags (including direction) are stored
                 * the byte after the 3-byte magic number */
                if (dir) {
index 3989dfc4a1ceabcb649f97ea4b3f11825731322d..0833653fcc7578f737fa541d9944c0e86b8d051c 100644 (file)
@@ -753,6 +753,13 @@ static const char rcsid[] _U_ =
  */
 #define LINKTYPE_DBUS                          231
 
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <[email protected]>. 
+ */
+#define LINKTYPE_JUNIPER_VS                    232
+#define LINKTYPE_JUNIPER_SRX_E2E               233
+#define LINKTYPE_JUNIPER_FIBRECHANNEL          234
 
 static struct linktype_map {
        int     dlt;
@@ -1105,6 +1112,15 @@ static struct linktype_map {
        /* D-Bus messages */
        { DLT_DBUS,             LINKTYPE_DBUS },
 
+        /* Juniper Virtual Server */
+       { DLT_JUNIPER_VS,       LINKTYPE_JUNIPER_VS },
+
+        /* Juniper SRX E2E debugging */
+       { DLT_JUNIPER_SRX_E2E,  LINKTYPE_JUNIPER_SRX_E2E },
+
+        /* Juniper Fibrechannel */
+       { DLT_JUNIPER_FIBRECHANNEL, LINKTYPE_JUNIPER_FIBRECHANNEL },
+
        { -1,                   -1 }
 };
 
diff --git a/pcap.c b/pcap.c
index 146c09c60e9170b466986d170d141ec0962a59ae..d26bf212888d51bd39100181585ba8f821092ac2 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -847,6 +847,9 @@ static struct dlt_choice dlt_choices[] = {
        DLT_CHOICE(DLT_IPV4, "Raw IPv4"),
        DLT_CHOICE(DLT_IPV6, "Raw IPv6"),
        DLT_CHOICE(DLT_IEEE802_15_4_NOFCS, "IEEE 802.15.4 without FCS"),
+       DLT_CHOICE(DLT_JUNIPER_VS, "Juniper Virtual Server"),
+       DLT_CHOICE(DLT_JUNIPER_SRX_E2E, "Juniper SRX E2E"),
+       DLT_CHOICE(DLT_JUNIPER_FIBRECHANNEL, "Juniper Fibrechannel"),
        DLT_CHOICE_SENTINEL
 };
 
index 3fa2bf288be798a634576e203b58bcbda796c511..67140ce7cef53b09194672675e8c8c4f6e1a3a65 100644 (file)
@@ -987,6 +987,14 @@ struct bpf_program {
  */
 #define DLT_DBUS                       231
 
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <[email protected]>.
+ */
+#define DLT_JUNIPER_VS                 232
+#define DLT_JUNIPER_SRX_E2E            233
+#define DLT_JUNIPER_FIBRECHANNEL       234
+
 /*
  * DLT and savefile link type values are split into a class and
  * a member of that class.  A class value of 0 indicates a regular