summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2000-09-23 08:26:30 +0000
committerguy <guy>2000-09-23 08:26:30 +0000
commit7b50febe28e54e076a9917164eeddec4bc7a170e (patch)
tree7a4ac443a00f2a7982234c9881c3706bb8e6e955
parente89409254248af64db721ede4babbe9fd1753f6c (diff)
downloadtcpdump-7b50febe28e54e076a9917164eeddec4bc7a170e.tar.gz
Add "tcp.h" and "udp.h" headers, to declare the TCP and UDP stuff needed
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.
-rw-r--r--FILES2
-rw-r--r--ether.h1
-rw-r--r--print-ah.c5
-rw-r--r--print-atalk.c5
-rw-r--r--print-atm.c5
-rw-r--r--print-bgp.c4
-rw-r--r--print-cip.c5
-rw-r--r--print-cnfp.c5
-rw-r--r--print-domain.c5
-rw-r--r--print-dvmrp.c5
-rw-r--r--print-esp.c5
-rw-r--r--print-ether.c5
-rw-r--r--print-frag6.c5
-rw-r--r--print-icmp.c7
-rw-r--r--print-icmp6.c5
-rw-r--r--print-igrp.c4
-rw-r--r--print-ip.c5
-rw-r--r--print-ip6.c5
-rw-r--r--print-ipcomp.c5
-rw-r--r--print-ipx.c5
-rw-r--r--print-isakmp.c5
-rw-r--r--print-krb.c4
-rw-r--r--print-lane.c5
-rw-r--r--print-netbios.c6
-rw-r--r--print-null.c5
-rw-r--r--print-raw.c5
-rw-r--r--print-rip.c4
-rw-r--r--print-ripng.c4
-rw-r--r--print-rt6.c5
-rw-r--r--print-sl.c6
-rw-r--r--print-stp.c6
-rw-r--r--print-tcp.c5
-rw-r--r--print-telnet.c3
-rw-r--r--print-udp.c6
-rw-r--r--tcp.h81
-rw-r--r--udp.h46
36 files changed, 172 insertions, 117 deletions
diff --git a/FILES b/FILES
index 8cd1eff9..f5425825 100644
--- 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 44081680..22170f47 100644
--- 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.
diff --git a/print-ah.c b/print-ah.c
index 79200304..47802514 100644
--- a/print-ah.c
+++ b/print-ah.c
@@ -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>
diff --git a/print-atalk.c b/print-atalk.c
index 87be2d2e..4dd12d66 100644
--- a/print-atalk.c
+++ b/print-atalk.c
@@ -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>
diff --git a/print-atm.c b/print-atm.c
index 485f9e96..b0c92b88 100644
--- a/print-atm.c
+++ b/print-atm.c
@@ -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>
diff --git a/print-bgp.c b/print-bgp.c
index 872a5f45..fe589587 100644
--- a/print-bgp.c
+++ b/print-bgp.c
@@ -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>
diff --git a/print-cip.c b/print-cip.c
index 6913c267..3b9e1f67 100644
--- a/print-cip.c
+++ b/print-cip.c
@@ -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>
diff --git a/print-cnfp.c b/print-cnfp.c
index 94194d05..cba4fc04 100644
--- a/print-cnfp.c
+++ b/print-cnfp.c
@@ -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;
diff --git a/print-domain.c b/print-domain.c
index 40bfeae0..73822407 100644
--- a/print-domain.c
+++ b/print-domain.c
@@ -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 */
diff --git a/print-dvmrp.c b/print-dvmrp.c
index 1be0cfa8..cc1da705 100644
--- a/print-dvmrp.c
+++ b/print-dvmrp.c
@@ -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>
diff --git a/print-esp.c b/print-esp.c
index 4e1c67b0..b0438494 100644
--- a/print-esp.c
+++ b/print-esp.c
@@ -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>
diff --git a/print-ether.c b/print-ether.c
index 33c58e28..aba4b584 100644
--- a/print-ether.c
+++ b/print-ether.c
@@ -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>
diff --git a/print-frag6.c b/print-frag6.c
index 59e03b6a..31d59836 100644
--- a/print-frag6.c
+++ b/print-frag6.c
@@ -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>
diff --git a/print-icmp.c b/print-icmp.c
index b04032d5..169f61e2 100644
--- a/print-icmp.c
+++ b/print-icmp.c
@@ -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 */
diff --git a/print-icmp6.c b/print-icmp6.c
index ff9bb250..4ceb8994 100644
--- a/print-icmp6.c
+++ b/print-icmp6.c
@@ -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>
diff --git a/print-igrp.c b/print-igrp.c
index b2cdb214..b3eead12 100644
--- a/print-igrp.c
+++ b/print-igrp.c
@@ -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>
diff --git a/print-ip.c b/print-ip.c
index 5fb6cf1a..6f770bd6 100644
--- a/print-ip.c
+++ b/print-ip.c
@@ -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>
diff --git a/print-ip6.c b/print-ip6.c
index 6e21a77a..2bf8e089 100644
--- a/print-ip6.c
+++ b/print-ip6.c
@@ -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>
diff --git a/print-ipcomp.c b/print-ipcomp.c
index cd4df116..70cf7aa0 100644
--- a/print-ipcomp.c
+++ b/print-ipcomp.c
@@ -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>
diff --git a/print-ipx.c b/print-ipx.c
index 323088d1..074755d1 100644
--- a/print-ipx.c
+++ b/print-ipx.c
@@ -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>
diff --git a/print-isakmp.c b/print-isakmp.c
index d9e2884b..b3d0e799 100644
--- a/print-isakmp.c
+++ b/print-isakmp.c
@@ -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>
diff --git a/print-krb.c b/print-krb.c
index d636c1f4..ca7a10ab 100644
--- a/print-krb.c
+++ b/print-krb.c
@@ -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>
diff --git a/print-lane.c b/print-lane.c
index be7849c4..5af32182 100644
--- a/print-lane.c
+++ b/print-lane.c
@@ -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>
diff --git a/print-netbios.c b/print-netbios.c
index d2bde873..5579999d 100644
--- a/print-netbios.c
+++ b/print-netbios.c
@@ -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>
diff --git a/print-null.c b/print-null.c
index c08f28dc..b7072181 100644
--- a/print-null.c
+++ b/print-null.c
@@ -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>
diff --git a/print-raw.c b/print-raw.c
index c335bb5c..19b04547 100644
--- a/print-raw.c
+++ b/print-raw.c
@@ -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>
diff --git a/print-rip.c b/print-rip.c
index 9f409eeb..1fbae152 100644
--- a/print-rip.c
+++ b/print-rip.c
@@ -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>
diff --git a/print-ripng.c b/print-ripng.c
index 5e87ff5e..bade766e 100644
--- a/print-ripng.c
+++ b/print-ripng.c
@@ -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>
diff --git a/print-rt6.c b/print-rt6.c
index 329553e1..13b403d5 100644
--- a/print-rt6.c
+++ b/print-rt6.c
@@ -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>
diff --git a/print-sl.c b/print-sl.c
index 32bb693a..e748391f 100644
--- a/print-sl.c
+++ b/print-sl.c
@@ -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;
diff --git a/print-stp.c b/print-stp.c
index 43bf9288..9e622a06 100644
--- a/print-stp.c
+++ b/print-stp.c
@@ -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>
diff --git a/print-tcp.c b/print-tcp.c
index 0f684272..3b0202fc 100644
--- a/print-tcp.c
+++ b/print-tcp.c
@@ -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
diff --git a/print-telnet.c b/print-telnet.c
index 5be7e6f1..7ba929f9 100644
--- a/print-telnet.c
+++ b/print-telnet.c
@@ -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
diff --git a/print-udp.c b/print-udp.c
index a852211f..eefec6db 100644
--- a/print-udp.c
+++ b/print-udp.c
@@ -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
index 00000000..38b959c0
--- /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
index 00000000..d684f117
--- /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 */
+};