作业/作业5/nack-oriented-reliable-multicast-master/norm-1.5r6/protolib/include/protoPktIP.h
void UpdateChecksum(UINT16 oldVal, UINT16 newVal)
        {
            UINT16 oldSum = GetChecksum();
            UINT32 sum = oldSum + oldVal + (~newVal & 0xffff);
            UINT16 newSum = (UINT16)(sum + (sum >> 16));
            SetChecksum(newSum);
        }
/** updates IPv4 header checksum when an aligned
        * (16-bit portion is changed (e.g. packet id)
        */
updates IPv4 header checksum when an aligned
(16-bit portion is changed
updates IPv4 header checksum when an aligned ( 16 - bit portion is changed
void UpdateChecksum(UINT16 oldVal, UINT16 newVal)
        {
            UINT16 oldSum = GetChecksum();
            UINT32 sum = oldSum + oldVal + (~newVal & 0xffff);
            UINT16 newSum = (UINT16)(sum + (sum >> 16));
            SetChecksum(newSum);
        }
void UpdateChecksum ( UINT16 oldVal , UINT16 newVal ) { UINT16 oldSum = GetChecksum ( ) ; UINT32 sum = oldSum + oldVal + ( ~ newVal & 0xffff ) ; UINT16 newSum = ( UINT16 ) ( sum + ( sum >> 16 ) ) ; SetChecksum ( newSum ) ; }
updates IPv4 header checksum when an aligned
 (16-bit portion is changed (e.g.
updates IPv4 header checksum when an aligned ( 16 - bit portion is changed ( e . g .