aboutsummaryrefslogtreecommitdiffstats
path: root/epan/in_cksum.h
AgeCommit message (Collapse)AuthorFilesLines
2014-08-09Clean up Internet checksum handling.Guy Harris1-0/+16
Add macros to set entries of a vec_t, one for use when you have a pointer to private data, and one for use when you have data in a tvbuff. The latter wraps the use of tvb_get_ptr(), so that you're not directly calling it in a dissector. Move ip_checksum() to epan/in_cksum.c, and add an ip_checksum_tvb() that wraps the use of tvb_get_ptr(). In the CARP dissector, give the length variable an unsigned type - there's no benefit to it being signed, and that requires some casts to be thrown around. In the DCCP dissector, check only against the coverage length to see if we have enough data, combine the "should we check the checksum?" check with the "*can* we check the checksum?" check in a single if, and throw a dissector assertion if the source network address type isn't IPv4 or IPv6. Get rid of inclues of <epan/in_cksum.h> in dissectors that don't use any of the Internet checksum routines. In the HIP dissector, make sure we have the data to calculate the checksum before doing so. Change-Id: I2f9674775dbb54c533d33082632809f7d32ec8ae Reviewed-on: https://code.wireshark.org/review/3517 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Fix warnings introduced in g2965913Pascal Quantin1-2/+0
Change-Id: I7b0fedf0c508404b3f2dea789f50b7b5db4e2eb7 Reviewed-on: https://code.wireshark.org/review/502 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-11-22Slap a BSD checksum onto in_cksum.h.Guy Harris1-1/+30
svn path=/trunk/; revision=53517
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-2/+4
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2011-09-14Add #define guard.Stig Bjørlykke1-0/+5
This fixes bug 6341. svn path=/trunk/; revision=38995
2004-09-28Move various checksum routines and headers to epan.Guy Harris1-0/+14
svn path=/trunk/; revision=12117