tcpdump mailing list archives
IPv6 dependency
From: Motonori Shindo <mshindo () mshindo net>
Date: Fri, 30 Apr 2004 00:24:03 +0900 (JST)
Hi, Please find attached a patch to remove IPv6 dependency from print-tcp.c to make it successfully compile under IPv4-only environment. Regards,
Index: print-tcp.c
===================================================================
RCS file: /tcpdump/master/tcpdump/print-tcp.c,v
retrieving revision 1.114
diff -c -r1.114 print-tcp.c
*** print-tcp.c 26 Apr 2004 06:17:31 -0000 1.114
--- print-tcp.c 28 Apr 2004 08:43:12 -0000
***************
*** 711,717 ****
--- 711,719 ----
char zero_proto = 0;
MD5_CTX ctx;
u_int16_t savecsum, tlen;
+ #ifdef INET6
struct ip6_hdr *ip6;
+ #endif
u_int32_t len32;
u_int8_t nxt;
***************
*** 732,737 ****
--- 734,740 ----
tlen = EXTRACT_16BITS(&ip->ip_len) - IP_HL(ip) * 4;
tlen = htons(tlen);
MD5_Update(&ctx, (char *)&tlen, sizeof(tlen));
+ #ifdef INET6
} else if (IP_V(ip) == 6) {
ip6 = (struct ip6_hdr *)ip;
MD5_Update(&ctx, (char *)&ip6->ip6_src, sizeof(ip6->ip6_src));
***************
*** 744,749 ****
--- 747,753 ----
MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
nxt = IPPROTO_TCP;
MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
+ #endif /* INET6 */
} else
return (-1);
- This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- IPv6 dependency Motonori Shindo (Apr 29)
- Re: IPv6 dependency Michael Richardson (Apr 29)
- Re: IPv6 dependency Guy Harris (Apr 29)
- Re: IPv6 dependency Michael Richardson (Apr 29)
- Re: IPv6 dependency Guy Harris (Apr 29)
- Re: IPv6 dependency Guy Harris (Apr 29)
- Re: IPv6 dependency Michael Richardson (Apr 29)
