Logo Search packages:      
Sourcecode: paris-traceroute version File versions  Download package

void IP4Header::computeAndSetChecksum (  ) 

Compute and set the Checksum field (byte 10-11) To be valid, verify that all fields of the IP datagram have been filled.

Definition at line 225 of file IP4Header.cc.

References Util::computeChecksum(), and Util::write16().

  Util::write16(header, 10, 0);
  uint16 chk = Util::computeChecksum((const uint16*)header, 20);
  Util::write16(header, 10, chk);

Generated by  Doxygen 1.6.0   Back to index