]> The Tcpdump Group git mirrors - libpcap/commitdiff
Support for LocalTalk hardware, from Uns Lider <[email protected]>.
authorguy <guy>
Mon, 18 Jun 2001 08:46:28 +0000 (08:46 +0000)
committerguy <guy>
Mon, 18 Jun 2001 08:46:28 +0000 (08:46 +0000)
CREDITS
gencode.c
pcap-linux.c

diff --git a/CREDITS b/CREDITS
index 6156c7650c8b528f1fccefe1258e55cd9d60a51a..54b22cd97c8b5a2459c1778c23df3cf3cc4ecf9e 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -38,6 +38,7 @@ Additional people who have contributed patches:
        Rick Jones                      <[email protected]>
        Stefan Hudson                   <[email protected]>
        Tony Li                         <[email protected]>
+       Uns Lider                       <[email protected]>
        Uwe Girlich                     <[email protected]>
        Xianjie Zhang                   <[email protected]>
 
index e567de14fcada6331a38d4356a94cc3c3ad8283a..1dbd44bc2bddc002bd6f35b48b1a90013667a557 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.154 2001-06-10 01:11:40 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.155 2001-06-18 08:46:29 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -694,6 +694,16 @@ init_linktype(type)
                off_linktype = 14;
                off_nl = 16;
                return;
+
+       case DLT_LTALK:
+               /*
+                * LocalTalk does have a 1-byte type field in the LLAP header,
+                * but really it just indicates whether there is a "short" or
+                * "long" DDP packet following.
+                */
+               off_linktype = -1;
+               off_nl = 0;
+               return;
        }
        bpf_error("unknown data link type %d", linktype);
        /* NOTREACHED */
@@ -1373,6 +1383,15 @@ gen_linktype(proto)
                                        (bpf_int32)htonl(ARCTYPE_ATALK)));
                }
                break;
+
+       case DLT_LTALK:
+               switch (proto) {
+               case ETHERTYPE_ATALK:
+                       return gen_true();
+               default:
+                       return gen_false();
+               }
+               break;
        }
 
        /*
index adabec4e337a904f1b6133312eaf7915a2a7d2ad..fd06df6a3ced532dc2015dd98abbff5e81448afa 100644 (file)
@@ -26,7 +26,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.58 2001-06-10 01:11:41 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.59 2001-06-18 08:46:30 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -704,6 +704,10 @@ static int map_arphrd_to_dlt(pcap_t *handle, int arptype)
                handle->linktype = DLT_RAW;
                break;
 
+       case ARPHRD_LOCALTLK:
+               handle->linktype = DLT_LTALK;
+               break;
+
        default:
                return -1;
        }