]> The Tcpdump Group git mirrors - libpcap/commitdiff
From Krzysztof Halasa <[email protected]>:
authorguy <guy>
Mon, 6 Oct 2003 07:04:55 +0000 (07:04 +0000)
committerguy <guy>
Mon, 6 Oct 2003 07:04:55 +0000 (07:04 +0000)
support Linux Frame Relay ARPHRD_FRAD as Frame Relay with an FR
header;

support Linux Frame Relay ARPHRD_DLCI in cooked mode;

current Linux kernels use the name ARPHRD_CISCO for Cisco HDLC
(513).

CREDITS
pcap-linux.c

diff --git a/CREDITS b/CREDITS
index 96241055adae0061ed98fc7a4e0d20d893812987..7ac6a610567483962eee70cfd0dd94ab8c4c1127 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -44,6 +44,7 @@ Additional people who have contributed patches:
        Jon Lindgren                    <[email protected]>
        Kazushi Sugyo                   <[email protected]>
        Klaus Klein                     <[email protected]>
+       Krzysztof Halasa                <[email protected]>
        Lorenzo Cavallaro               <[email protected]>
        Loris Degioanni                 <[email protected]>
        Love Hörnquist-Ã…strand          <[email protected]>
index 3931caac4ca2d67f481206538e2c0660871d5a20..9828d1379290a11a37552e86250441fbc148ffb1 100644 (file)
@@ -27,7 +27,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.95 2003-07-25 05:32:04 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.96 2003-10-06 07:04:55 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -1074,10 +1074,10 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok)
                }
                break;
 
-#ifndef ARPHRD_HDLC
-#define ARPHRD_HDLC 513        /* From Linux 2.2.13 */
+#ifndef ARPHRD_CISCO
+#define ARPHRD_CISCO 513 /* previously ARPHRD_HDLC */
 #endif
-       case ARPHRD_HDLC:
+       case ARPHRD_CISCO:
                handle->linktype = DLT_C_HDLC;
                break;
 
@@ -1097,6 +1097,10 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok)
 #define ARPHRD_RAWHDLC 518
 #endif
        case ARPHRD_RAWHDLC:
+#ifndef ARPHRD_DLCI
+#define ARPHRD_DLCI 15
+#endif
+       case ARPHRD_DLCI:
                /*
                 * XXX - should some of those be mapped to DLT_LINUX_SLL
                 * instead?  Should we just map all of them to DLT_LINUX_SLL?
@@ -1104,6 +1108,13 @@ static void map_arphrd_to_dlt(pcap_t *handle, int arptype, int cooked_ok)
                handle->linktype = DLT_RAW;
                break;
 
+#ifndef ARPHRD_FRAD
+#define ARPHRD_FRAD 770
+#endif
+       case ARPHRD_FRAD:
+               handle->linktype = DLT_FRELAY;
+               break;
+
        case ARPHRD_LOCALTLK:
                handle->linktype = DLT_LTALK;
                break;