summaryrefslogtreecommitdiff
path: root/ip6.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-06-13 14:08:51 -0700
committerGuy Harris <guy@alum.mit.edu>2011-06-13 14:08:51 -0700
commit94a4b4608009a96bf791ff24b2d019f40a120085 (patch)
tree41899d9a56ee613b9d6b754401bdb2de36c9fee8 /ip6.h
parent26d81cbe26f0dd73e32ea615b2576dfdca71cfb7 (diff)
downloadtcpdump-94a4b4608009a96bf791ff24b2d019f40a120085.tar.gz
Go with Wireshark's Internet checksum routine.
The Wireshark routine is based on the BSD in-kernel portable checksum routine (thus BSD-licensed); it takes a vector of pointers and lengths and checksums the concatenation of the buffers in question (just as the BSD in-kernel routine checksums a chain of mbufs). This simplifies the "with a pseudo-header" checksums; hopefully it'll fix up the problems being seen on some big-endian platforms, which might be due to hand-calculating some or all of the checksum and doing so incorrectly. It also gets rid of some code that might be dereferencing unaligned pointers.
Diffstat (limited to 'ip6.h')
-rw-r--r--ip6.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/ip6.h b/ip6.h
index 0a80f394..c54b5b2e 100644
--- a/ip6.h
+++ b/ip6.h
@@ -88,20 +88,6 @@ struct ip6_hdr {
struct in6_addr ip6_dst; /* destination address */
} UNALIGNED;
-/*
- * Pseudo header, used for higher layer checksumming.
- */
-union ip6_pseudo_hdr {
- struct {
- struct in6_addr ph_src;
- struct in6_addr ph_dst;
- u_int32_t ph_len;
- u_int8_t ph_zero[3];
- u_int8_t ph_nxt;
- } ph;
- u_int16_t pa[20];
-} UNALIGNED;
-
#define ip6_vfc ip6_ctlun.ip6_un2_vfc
#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen