]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
Get rid of unneeded includes of <net/if.h>.
[tcpdump] / print-tcp.c
index 1f09536d7a53adde2a90452b18cb4441155e8489..b7773df2d07388fbb21361b26042c0f22d6172ff 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.71 2000-08-01 17:28:09 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.74 2000-09-23 08:54:41 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -35,9 +35,6 @@ static const char rcsid[] =
 
 #include <netinet/in.h>
 #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 +50,10 @@ static const char rcsid[] =
 #include "addrtoname.h"
 #include "extract.h"
 
+#include "tcp.h"
+
+#include "ip.h"
+
 static void print_tcp_rst_data(register const u_char *sp, u_int length);
 
 #define MAX_RST_DATA_LEN       30
@@ -156,7 +157,7 @@ static int tcp_cksum(register const struct ip *ip,
        /* pseudo-header.. */
        phu.ph.len = htons(tlen);
        phu.ph.mbz = 0;
-       phu.ph.proto = ip->ip_p;
+       phu.ph.proto = IPPROTO_TCP;
        memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
        memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));