Bugzilla – Bug 34
ip checksum calculation is disabled
Last modified: 2008-07-01 13:32:14 UTC
It was disabled after some changes to the Packet/Buffer API a few months ago. To re-enable it, I think that the right way to go is to add uint32_t Buffer::CalculateIpChecksum (Buffer::Iterator start, Buffer::Iterator end);
Created attachment 146 [details] Add ipv4 checksum support. Adds a static Checksum method to the ipv4 header class. Note that it only handles 20 byte ipv4 headers.
Created attachment 147 [details] Add ipv4 header checksum support. Essentially the same as the previous version, but this one will handle an ipv4 header with options, too. I tried to re-use src/internet-node/ipv4-checksum.cc, but first moving the header data from Buffer::Iterator to a temporary copy so it can be fed to the existing code is almost as much code as doing the checksumming right away.
looks good to me. can commit as-is.
there's also this line in the header file that needs fixed: * \brief Enable checksum calculation for IP (XXX currently has no effect) also, should this m_calcChecksum value be integrated into the attribute system?
(In reply to comment #4) > also, should this m_calcChecksum value be integrated into the attribute system? One way to integrate this in the attribute system would be to move this variable to the Ipv4L3Protocol object and make Ipv4Header::m_calcChecksum a non-static variable and set it based on the Ipv4L3Protocol::m_calcChecksum value.
changeset: aabbcb2cba71