]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add "tcp.h" and "udp.h" headers, to declare the TCP and UDP stuff needed
authorguy <guy>
Sat, 23 Sep 2000 08:26:30 +0000 (08:26 +0000)
committerguy <guy>
Sat, 23 Sep 2000 08:26:30 +0000 (08:26 +0000)
by dissectors, and have dissectors include them rather than
<netinet/udp.h>, <netinet/udp_var.h>, or <netinet/tcp.h>, if they
actually need that stuff.

Remove all unnecessary includes of <netinet/udp*.h> or <netinet/tcp*.h>
files.

36 files changed:
FILES
ether.h
print-ah.c
print-atalk.c
print-atm.c
print-bgp.c
print-cip.c
print-cnfp.c
print-domain.c
print-dvmrp.c
print-esp.c
print-ether.c
print-frag6.c
print-icmp.c
print-icmp6.c
print-igrp.c
print-ip.c
print-ip6.c
print-ipcomp.c
print-ipx.c
print-isakmp.c
print-krb.c
print-lane.c
print-netbios.c
print-null.c
print-raw.c
print-rip.c
print-ripng.c
print-rt6.c
print-sl.c
print-stp.c
print-tcp.c
print-telnet.c
print-udp.c
tcp.h [new file with mode: 0644]
udp.h [new file with mode: 0644]

diff --git a/FILES b/FILES
index 8cd1eff98da990f355e58fec184dba0d0f6add43..f5425825908432bc37a26a7f3860834f524a1704 100644 (file)
--- a/FILES
+++ b/FILES
@@ -158,8 +158,10 @@ smb.h
 smbutil.c
 stime.awk
 strcasecmp.c
+tcp.h
 tcpdump.1
 tcpdump.c
 token.h
+udp.h
 util.c
 vfprintf.c
diff --git a/ether.h b/ether.h
index 44081680ca4189d50c772c934a0ea6d836873bdf..22170f476e5d67ca32f809a73f8ee343aa4e7bee 100644 (file)
--- a/ether.h
+++ b/ether.h
@@ -1,3 +1,4 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.2 2000-09-23 08:26:30 guy Exp $ (LBL) */
 /*
  * Copyright (c) 1982, 1986, 1993
  *     The Regents of the University of California.  All rights reserved.
index 792003046309b036a632a0a65878d42ab4c1687c..4780251434cc43ebaa88f7c018a1f687fe7f9836 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.6 2000-09-23 08:03:30 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.7 2000-09-23 08:26:30 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -43,9 +43,6 @@ static const char rcsid[] =
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 
index 87be2d2ee3aee7de3034aeddc1845bfdd8c1e258..4dd12d667cc96bd6ba1410d672933b9543ea3980 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.55 2000-09-23 08:03:31 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.56 2000-09-23 08:26:30 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -44,9 +44,6 @@ struct rtentry;
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <stdlib.h>
index 485f9e96d18e127845d07535d2c7c8f0d2c2c289..b0c92b88c40ba93791bc586472e33a7e12288e08 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.14 2000-09-23 08:03:33 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.15 2000-09-23 08:26:31 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,9 +39,6 @@ struct rtentry;
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <pcap.h>
index 872a5f4543058f4184387233c18c94832d2b7311..fe5895872a76711c8a7afe7e811234d00e07212c 100644 (file)
@@ -33,7 +33,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-     "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.13 2000-04-28 11:34:12 itojun Exp $";
+     "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.14 2000-09-23 08:26:31 guy Exp $";
 #endif
 
 #include <sys/param.h>
@@ -45,8 +45,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
 
 #include <errno.h>
 #include <stdio.h>
index 6913c2671da91e4a0daaeb92c1717a0fea6112c5..3b9e1f6762b80d672e742160aad53c7e646c381f 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.5 2000-09-23 08:03:34 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.6 2000-09-23 08:26:31 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -40,9 +40,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <pcap.h>
index 94194d05cfe377e845aec9c8cc5811a30c95ac17..cba4fc0443b1f6da1788e0238df2fd1bff791a8d 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.5 2000-05-15 00:37:34 assar Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.6 2000-09-23 08:26:32 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -47,7 +47,6 @@ static const char rcsid[] =
 #include <netdb.h>
 
 #include <netinet/in.h>
-#include <netinet/tcp.h>
 
 #include <arpa/inet.h>
 
@@ -56,6 +55,8 @@ static const char rcsid[] =
 
 #include "interface.h"
 
+#include "tcp.h"
+
 struct nfhdr {
        u_int32_t       ver_cnt;        /* version [15], and # of records */
        u_int32_t       msys_uptime;
index 40bfeae007dab493a0ee2cc020fb558e36f97828..738224070a8b3cc6883aa280470f8d9f73c771cf 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.47 2000-09-23 08:03:34 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.48 2000-09-23 08:26:32 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -40,9 +40,6 @@ struct rtentry;
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #ifdef NOERROR
 #undef NOERROR                                 /* Solaris sucks */
index 1be0cfa8cfb055e28c7fcf7d9f494054d10fc1da..cc1da70515c17646f65291548f2c40a9e10b0076 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.17 1999-11-22 04:30:34 fenner Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.18 2000-09-23 08:26:33 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,9 +36,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <string.h>
index 4e1c67b0b936a22bcfd7e710b5695633cc69dfc8..b0438494a2f330bff619192317d8d23654de3b66 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.7 2000-09-23 08:03:34 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.8 2000-09-23 08:26:33 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -44,9 +44,6 @@ static const char rcsid[] =
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #ifdef HAVE_LIBCRYPTO
 #include <des.h>
index 33c58e28b51922005b4f05dc916fb52525836f00..aba4b5844d27ce35a1aa5e5bb28409567cf9f59d 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.52 2000-09-23 08:03:35 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.53 2000-09-23 08:26:33 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,9 +39,6 @@ struct rtentry;
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <pcap.h>
index 59e03b6a1a26e974f81decfc643a05c9327b9778..31d5983605bb31cea363307a70f5cd3a711db152 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.6 2000-09-23 08:03:35 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.7 2000-09-23 08:26:33 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -42,9 +42,6 @@ static const char rcsid[] =
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 
index b04032d503b833e70c1343c7c106d057400c26de..169f61e28512ddb15c21c64ab7b19a179c261f3f 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.49 2000-09-23 08:03:35 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.50 2000-09-23 08:26:34 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -41,9 +41,6 @@ struct rtentry;
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -52,6 +49,8 @@ struct rtentry;
 #include "addrtoname.h"
 #include "extract.h"                   /* must come after interface.h */
 
+#include "udp.h"
+
 /* rfc1700 */
 #ifndef ICMP_UNREACH_NET_UNKNOWN
 #define ICMP_UNREACH_NET_UNKNOWN       6       /* destination net unknown */
index ff9bb250316ab3ebe0a8d687153834211c155863..4ceb899472eaca118ef8f261bfe79071f9eaa69d 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.22 2000-09-23 08:03:36 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.23 2000-09-23 08:26:34 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -44,9 +44,6 @@ static const char rcsid[] =
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <arpa/inet.h>
 
index b2cdb2141df6bedb954700152db0156ef5c4afe4..b3eead128fb84514773bfeece511e58ee7277a73 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.12 2000-04-28 11:01:49 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.13 2000-09-23 08:26:34 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -38,8 +38,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
 
 #include <errno.h>
 #include <stdio.h>
index 5fb6cf1a817f1e4cc38d44a8701e88b72787ca5a..6f770bd658771eef1f16d0579c4fb72adf1a6330 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.85 2000-07-29 06:06:27 assar Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.86 2000-09-23 08:26:34 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,9 +36,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <stdlib.h>
index 6e21a77a8637a83aca956dc37c55f9df3e7e8f93..2bf8e089205c00b4ad94a036863d214f919d41d3 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.9 2000-07-29 07:53:28 assar Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.10 2000-09-23 08:26:35 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,9 +39,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <stdlib.h>
index cd4df1166a8eb569025696d62e157ec7878a23ce..70cf7aa0023a9dc1a0d6533c0a987dcb5128a2ee 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.5 2000-09-23 08:03:36 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.6 2000-09-23 08:26:35 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -42,9 +42,6 @@ static const char rcsid[] =
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 
index 323088d19e40fc62d989f467386566eb5e5546d3..074755d1ef4c7a1c309d822e0c973459595f9757 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.24 2000-07-01 03:39:05 assar Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.25 2000-09-23 08:26:35 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,9 +39,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdlib.h>
 #include <stdio.h>
index d9e2884b72fef8473e9a36d3aef550b0dcfe707f..b3d0e79986295b717c46a8d02bf15b7d971d42a8 100644 (file)
@@ -30,7 +30,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.16 2000-09-23 08:03:37 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.17 2000-09-23 08:26:35 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -51,9 +51,6 @@ struct rtentry;
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #ifdef INET6
 #include <netinet/ip6.h>
index d636c1f4acf87a623701f810d18ae4eb1a9ea630..ca7a10abe338a0c33f95712f4fed22ffe95c3e8e 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.12 1999-11-21 09:36:55 fenner Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.13 2000-09-23 08:26:36 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -38,8 +38,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
 
 #include <ctype.h>
 #include <errno.h>
index be7849c40ea487d9effe4a8e3112f73f6210a582..5af3218292faac2863e5d6176a101c5425d7707c 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.5 2000-09-23 08:03:37 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.6 2000-09-23 08:26:36 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -40,9 +40,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <pcap.h>
index d2bde87392f03e702e8adac0c6d42c38da2555c5..5579999df066b9adea47131209bc9574dcc212e0 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-netbios.c,v 1.14 2000-07-01 03:39:06 assar Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-netbios.c,v 1.15 2000-09-23 08:26:36 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -38,10 +38,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcpip.h>
 
 #include <stdlib.h>
 #include <stdio.h>
index c08f28dc224d042bcbf9d031f214c80322231a13..b7072181561443293e333da817f264d4f4b01514 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.32 2000-09-23 08:03:39 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.33 2000-09-23 08:26:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -42,9 +42,6 @@ struct rtentry;
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <pcap.h>
 #include <stdio.h>
index c335bb5c1426872088b7738a3879e1d68dedaff5..19b04547b718848d9b89b7d4a763168248f31908 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.28 2000-09-23 08:03:40 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.29 2000-09-23 08:26:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -42,9 +42,6 @@ struct rtentry;
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <pcap.h>
 #include <stdio.h>
index 9f409eebe4b6ce344d9a487d870b77c1f860a1b3..1fbae15286a9aaa3032ddb53763834d40e90b678 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.42 2000-07-01 03:39:09 assar Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.43 2000-09-23 08:26:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,8 +36,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
 
 #include <stdio.h>
 #include <ctype.h>
index 5e87ff5e0f41431f013a846f4db42132f457f82d..bade766ea490b9a5a1ad868b0b40b807a3e67174 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.3 2000-01-09 21:34:19 fenner Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.4 2000-09-23 08:26:37 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -39,8 +39,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
 
 #include <errno.h>
 #include <stdio.h>
index 329553e1236d914167d33d0cbd4bbc06467f5d25..13b403d5a1010ff89668d4a40f872ec2785fcba6 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.10 2000-09-23 08:03:40 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.11 2000-09-23 08:26:37 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -42,9 +42,6 @@ static const char rcsid[] =
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 
index 32bb693a85ea7abeca90323834c3b806734e8849..e748391fa2249c857277bc3b516c8f3df8c7e49b 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.48 2000-09-23 08:03:40 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.49 2000-09-23 08:26:38 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -44,8 +44,6 @@ struct rtentry;
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
-#include <netinet/udp.h>
-#include <netinet/tcp.h>
 
 #include <net/slcompress.h>
 #include <net/slip.h>
@@ -59,6 +57,8 @@ struct rtentry;
 #include "addrtoname.h"
 #include "extract.h"                   /* must come after interface.h */
 
+#include "tcp.h"
+
 static u_int lastlen[2][256];
 static u_int lastconn = 255;
 
index 43bf9288be59ba73d85bcce50b4f5db69c1d1706..9e622a060799631739153121f308a09a9d3e0a7c 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.3 2000-07-01 03:39:10 assar Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.4 2000-09-23 08:26:38 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -26,10 +26,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcpip.h>
 
 #include <stdlib.h>
 #include <stdio.h>
index 0f684272f8acc676e62261ac4562d3d593830e97..3b0202fcb1584bc5a7d953a2b95caf4d214b4c64 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.72 2000-08-01 17:35:05 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.73 2000-09-23 08:26:38 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -37,7 +37,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/tcp.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -53,6 +52,8 @@ static const char rcsid[] =
 #include "addrtoname.h"
 #include "extract.h"
 
+#include "tcp.h"
+
 static void print_tcp_rst_data(register const u_char *sp, u_int length);
 
 #define MAX_RST_DATA_LEN       30
index 5be7e6f1d386cc4d9089fa47eff5d32a6ac88672..7ba929f9b086e28c9335f9d7be58bbd63f2033ac 100644 (file)
@@ -51,7 +51,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-     "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.9 2000-07-01 03:39:11 assar Exp $";
+     "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.10 2000-09-23 08:26:38 guy Exp $";
 #endif
 
 #include <sys/param.h>
@@ -63,7 +63,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/tcp.h>
 
 #define TELCMDS
 #define TELOPTS
index a852211f4c023f4712c7bee7eda315be640471c3..eefec6db8f6156ae16fe031949d1c064b0ee468a 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.77 2000-08-03 22:21:19 fenner Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.78 2000-09-23 08:26:39 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,8 +36,6 @@ static const char rcsid[] =
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
-#include <netinet/udp.h>
-#include <netinet/udp_var.h>
 
 #ifdef SEGSIZE
 #undef SEGSIZE
@@ -56,6 +54,8 @@ static const char rcsid[] =
 #include "addrtoname.h"
 #include "appletalk.h"
 
+#include "udp.h"
+
 #ifdef NOERROR
 #undef NOERROR                                 /* Solaris sucks */
 #endif
diff --git a/tcp.h b/tcp.h
new file mode 100644 (file)
index 0000000..38b959c
--- /dev/null
+++ b/tcp.h
@@ -0,0 +1,81 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.1 2000-09-23 08:26:39 guy Exp $ (LBL) */
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)tcp.h       8.1 (Berkeley) 6/10/93
+ */
+
+typedef        u_int   tcp_seq;
+/*
+ * TCP header.
+ * Per RFC 793, September, 1981.
+ */
+struct tcphdr {
+       u_short th_sport;               /* source port */
+       u_short th_dport;               /* destination port */
+       tcp_seq th_seq;                 /* sequence number */
+       tcp_seq th_ack;                 /* acknowledgement number */
+#if BYTE_ORDER == LITTLE_ENDIAN 
+       u_char  th_x2:4,                /* (unused) */
+               th_off:4;               /* data offset */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN 
+       u_char  th_off:4,               /* data offset */
+               th_x2:4;                /* (unused) */
+#endif
+       u_char  th_flags;
+#define        TH_FIN  0x01
+#define        TH_SYN  0x02
+#define        TH_RST  0x04
+#define        TH_PUSH 0x08
+#define        TH_ACK  0x10
+#define        TH_URG  0x20
+       u_short th_win;                 /* window */
+       u_short th_sum;                 /* checksum */
+       u_short th_urp;                 /* urgent pointer */
+};
+
+#define        TCPOPT_EOL              0
+#define        TCPOPT_NOP              1
+#define        TCPOPT_MAXSEG           2
+#define    TCPOLEN_MAXSEG              4
+#define TCPOPT_WINDOW          3
+#define    TCPOLEN_WINDOW              3
+#define TCPOPT_SACK_PERMITTED  4               /* Experimental */
+#define    TCPOLEN_SACK_PERMITTED      2
+#define TCPOPT_SACK            5               /* Experimental */
+#define TCPOPT_TIMESTAMP       8
+#define    TCPOLEN_TIMESTAMP           10
+#define    TCPOLEN_TSTAMP_APPA         (TCPOLEN_TIMESTAMP+2) /* appendix A */
+
+#define TCPOPT_TSTAMP_HDR      \
+    (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
diff --git a/udp.h b/udp.h
new file mode 100644 (file)
index 0000000..d684f11
--- /dev/null
+++ b/udp.h
@@ -0,0 +1,46 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.1 2000-09-23 08:26:39 guy Exp $ (LBL) */
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)udp.h       8.1 (Berkeley) 6/10/93
+ */
+
+/*
+ * Udp protocol header.
+ * Per RFC 768, September, 1981.
+ */
+struct udphdr {
+       u_short uh_sport;               /* source port */
+       u_short uh_dport;               /* destination port */
+       short   uh_ulen;                /* udp length */
+       u_short uh_sum;                 /* udp checksum */
+};