]> The Tcpdump Group git mirrors - libpcap/commitdiff
add support for DLT_JUNIPER_{MLFR,MLPPP)
authorhannes <hannes>
Tue, 25 Jan 2005 22:38:23 +0000 (22:38 +0000)
committerhannes <hannes>
Tue, 25 Jan 2005 22:38:23 +0000 (22:38 +0000)
gencode.c
pcap.c

index 535f4a64b262997527dd831a3485f7a6cdbd399e..0c77fd95b396186e546bb482523bd7bfcd534027 100644 (file)
--- 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.216 2005-01-12 09:02:55 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.217 2005-01-25 22:38:23 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -1023,11 +1023,12 @@ init_linktype(p)
                off_nl_nosnap = PFLOG_HDRLEN;
                return;
 
+        case DLT_JUNIPER_MLFR:
         case DLT_JUNIPER_MLPPP:
                 off_linktype = 4;
                off_nl = 4;
                off_nl_nosnap = -1;
-                break;
+                return;
 
        case DLT_JUNIPER_ATM1:
                off_linktype = 4; /* in reality variable between 4-8 */
@@ -1828,11 +1829,12 @@ gen_linktype(proto)
                /*NOTREACHED*/
                break;
 
+        case DLT_JUNIPER_MLFR:
         case DLT_JUNIPER_MLPPP:
        case DLT_JUNIPER_ATM1:
        case DLT_JUNIPER_ATM2:
                /* just lets verify the magic number for now -
-                * we may have up to 6 different encapsulations on the wire
+                * 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
                 * might be;
                 *
@@ -5125,6 +5127,7 @@ gen_inbound(dir)
                }
                break;
 
+        case DLT_JUNIPER_MLFR:
         case DLT_JUNIPER_MLPPP:
        case DLT_JUNIPER_ATM1:
        case DLT_JUNIPER_ATM2:
diff --git a/pcap.c b/pcap.c
index 4d0a3ad185a27e5e4a0e3ced851a3d03d35e09ff..1588f86c0eb36e5ee066d36d40575eccd2c09dfb 100644 (file)
--- 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.83 2005-01-12 09:15:05 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.84 2005-01-25 22:38:23 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -366,6 +366,8 @@ static struct dlt_choice dlt_choices[] = {
        DLT_CHOICE(DLT_GPF_T, "GPF-T"),
        DLT_CHOICE(DLT_GPF_F, "GPF-F"),
        DLT_CHOICE(DLT_JUNIPER_PIC_PEER, "Juniper PIC Peer"),
+       DLT_CHOICE(DLT_JUNIPER_MLFR, "Juniper Multi-Link Frame Relay"),
+        DLT_CHOICE(DLT_JUNIPER_MLPPP, "Juniper Multi-Link PPP"),
        DLT_CHOICE_SENTINEL
 };