I am trying to make a network analyzer, but I have a problem when I
compute the checksum of TCP segment.
I preanexe a pice of IP segment (12 bytes) to TCP segment:
0x0028 ----------------------------------------------------
| IP source
|
----------------------------------------------------
| IP destination
|
---------------------------------------------------
| zeros | protocol | TCP length
|
---------------------------------------------------
I calc the ckecksum over this piece: partialchksum = cksum ( 12 bytes
, 0x0028, 0).
After I put the field checksum to 0 on TCP header, I calc :
totalchksum = chksum ( TCP length, &TCPSegment, ~partial
chksum ).
With this operations I get a bad result.
Thanks for our help.
Marcial Estevez.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe