diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-12-13 02:24:23 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-12-13 02:24:23 +0000 |
commit | 7fe2cf548d01632304f2ea51b1f856e7c4649fa0 (patch) | |
tree | 08581cec2fec47739698a8b41d485ce576572b9a /in_cksum.h | |
parent | a3a38fc3f82615610076bf19c051ce2c89986812 (diff) |
Add code to check the checksums of TCP segments and UDP datagrams;
replace the existing checksummer with a modified version of the BSD
checksumming code. Add a flag to the "packet_info" structure to
indicate that a packet is the first fragment of a fragmented datagram,
so that the checksummers won't try to checksum those.
(It doesn't seem to add a lot of CPU overhead, so we don't introduce a
flag to disable it, yet. Further checks may be necessary to see whether
the overhead is just swamped by other overheads when scanning through a
capture dissecting all frames, or if it truly is negligible.)
Make the Boolean preference option controlling whether to make the
top-level protocol tree item for TCP display a packet summary static to
the TCP dissector (it doesn't need to be accessible outside the TCP
dissector).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2751 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'in_cksum.h')
-rw-r--r-- | in_cksum.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/in_cksum.h b/in_cksum.h new file mode 100644 index 0000000000..66cbcc4a91 --- /dev/null +++ b/in_cksum.h @@ -0,0 +1,14 @@ +/* in_cksum.h + * Declaration of Internet checksum routine. + * + * $Id: in_cksum.h,v 1.1 2000/12/13 02:24:22 guy Exp $ + */ + +typedef struct { + const guint8 *ptr; + int len; +} vec_t; + +extern int in_cksum(const vec_t *vec, int veclen); + +extern guint16 in_cksum_shouldbe(guint16 sum, guint16 computed_sum); |