X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/edde6f560a0e967c06d0c8d8276c94ba2ab01103..8b67f771343e94182b048b0cae3ffe164dc37bb9:/print-tcp.c diff --git a/print-tcp.c b/print-tcp.c index 1f09536d..b7773df2 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.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 #include -#include -#include -#include #include #include @@ -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));