diff options
Diffstat (limited to 'src/common/Network/Packet/IPHeader.inl')
-rwxr-xr-x | src/common/Network/Packet/IPHeader.inl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/Network/Packet/IPHeader.inl b/src/common/Network/Packet/IPHeader.inl index e7b87f06..26ea551a 100755 --- a/src/common/Network/Packet/IPHeader.inl +++ b/src/common/Network/Packet/IPHeader.inl @@ -258,6 +258,12 @@ inline void IPHeader::updateTotalLength(uint16_t newlen) myChecksum = pkt_UpdateInetChecksum(myChecksum,oldLen,myLength); } +// updating checksum after changing old val to new +inline void IPHeader::updateCheckSum(uint16_t old_val, uint16_t new_val) +{ + myChecksum = pkt_UpdateInetChecksum(myChecksum, old_val, new_val); +} + inline void IPHeader::updateCheckSum() { myChecksum = 0; |