]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-chdlc.c
The stuff in the "linux-include" directory is no longer needed, as we no
[tcpdump] / print-chdlc.c
index 9fd3c8423c91d8559b98ce2842a2686c7cb514b4..aa1b330d24a1db2b672a5ed7c0bb3d49e1a90484 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.3 2000-04-24 12:59:39 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.11 2000-10-09 01:53:19 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -31,40 +31,19 @@ static const char rcsid[] =
 
 #include <sys/param.h>
 #include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-
-#if __STDC__
-struct mbuf;
-struct rtentry;
-#endif
-#include <net/if.h>
 
 #include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/if_ether.h>
 
 #include <ctype.h>
 #include <netdb.h>
 #include <pcap.h>
 #include <stdio.h>
-#ifdef __bsdi__
-#include <net/slcompress.h>
-#include <net/if_ppp.h>
-#endif
 
 #include "interface.h"
 #include "addrtoname.h"
+#include "ethertype.h"
 #include "ppp.h"
-
-/* XXX This goes somewhere else. */
-#define CHDLC_HDRLEN 4
-#define CHDLC_UNICAST  0x0f
-#define CHDLC_BCAST    0x8f
-#define CHDLC_TYPE_SLARP       0x8035
-#define CHDLC_TYPE_CDP         0x2000
+#include "chdlc.h"
 
 static void chdlc_slarp_print(const u_char *, u_int);
 
@@ -136,7 +115,7 @@ out:
 }
 
 struct cisco_slarp {
-       long code;
+       u_int32_t code;
 #define SLARP_REQUEST  0
 #define SLARP_REPLY    1
 #define SLARP_KEEPALIVE        2
@@ -144,14 +123,14 @@ struct cisco_slarp {
                struct {
                        struct in_addr addr;
                        struct in_addr mask;
-                       u_short unused[3];
+                       u_int16_t unused[3];
                } addr;
                struct {
-                       long myseq;
-                       long yourseq;
-                       short rel;
-                       short t1;
-                       short t2;
+                       u_int32_t myseq;
+                       u_int32_t yourseq;
+                       u_int16_t rel;
+                       u_int16_t t1;
+                       u_int16_t t2;
                } keep;
        } un;
 };