summaryrefslogtreecommitdiff
path: root/print-dccp.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a routine to do the "checksum with pseudo-header" stuff for IPv4.Guy Harris2011-06-171-26/+3
| | | | Clean up some other stuff while we're at it.
* Use nextproto6_cksum() for XXX-over-IPv6 checksums.Guy Harris2011-06-171-22/+2
| | | | Get rid of duplicated checksums with IPv6 pseudo-headers.
* Go with Wireshark's Internet checksum routine.Guy Harris2011-06-131-41/+38
| | | | | | | | | | | | | 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.
* Don't directly fetch multi-byte integers from packets.Guy Harris2010-02-211-18/+8
| | | | | | | | Use the EXTRACT_ macros to extract multi-byte integral values from packets, rather than just dereferencing pointers into the packet; there is no guarantee that the packet data will be aligned on the right boundary, and there is no guarantee that, if they're not, a direct access will work correctly.
* From Gerrit Renker:guy2007-11-091-25/+14
| | | | | | | | | don't compute checksums when the snapshot length is less than the packet length; combine duplicate code; eliminate unnecessary test.
* from Gerrit Renker <gerrit@erg.abdn.ac.uk>:hannes2006-11-021-19/+17
| | | | | | | | | add support for variable-length checksum in DCCP, as per section 9 of RFC 4340. remove duplicated code in dccp6_cksum (which just repeated the code of in_cksum fix a bug in dccp.h -- the fields of CCVAL and CSCOV were swapped (see section 5.1 of RFC 4340) fix a typo in the display of incorrect checksums old output `cksum xDEAD (incorrect (-> xBEEF)', new output `cksum xDEAD (incorrect -> xBEEF)'
* From Andrea Bittau: fetch the service code in network byte order.guy2006-02-191-3/+5
|
* From Gisle Vanem: don't use GCC features such as the ability to declareguy2005-12-051-5/+9
| | | | | | variables in the middle of the block., and #if out dccp_hdr_data() (which is unused, and defined in such a fashion that it doesn't work on MSVC++, with the structure name and the function name the same).
* The ANSI C Committee sayeth "Thou shalt not add to a pointer to void,guy2005-11-081-2/+2
| | | | for a void hath no size".
* from Ian Mc Donald <imcdnzl AT gmail.com>:hannes2005-11-041-22/+23
| | | | displaying ACKs for close packets
* Add RCS IDs.guy2005-09-201-0/+6
|
* From Ian McDonald and Arnaldo Carvalho de Melo: DCCP support.guy2005-09-201-0/+520