tcpdump mailing list archives

Re: Checksum


From: Guy Harris <guy () alum mit edu>
Date: Wed, 15 Mar 2006 02:50:50 -0800

Luis Del Pino wrote:
When I capture an UDP datagram from a well-known source, Could the checksum
be incorrect?

Yes, if the packet was corrupted.  (I assume you're capturing with libpcap.)

do I have to calculate it?

If you want to check whether the packet was corrupted, yes. See tcpdump's print-udp.c for an example of how to check the checksum. (Note that a checksum value of 0 means "no checksum".)
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: