Commit b4bfd166 authored by garciay's avatar garciay
Browse files

Add support of external function to validate IPv6 checksum

parent bd4c7693
Loading
Loading
Loading
Loading
+44 −1
Original line number Diff line number Diff line
@@ -538,4 +538,47 @@ module LibItsIpv6OverGeoNetworking_Functions {
    
    } // end group miscellaneous
    
    group externalFunctions {
        
        /**
         * @desc    Calculate ICMPv6 checksum on pseudo header according RFC 4443 - Clause 2.3
         * @param   p_sourceAddress         Source address, 
         * @param   p_destinationAddress    Destination address
         * @param   p_nextHdr               Next header value (e.g. 0x3a for ICMPv6)
         * @param   p_payloadLength         Upper-Layer Packet Length
         * @return  The checksum value
         * <pre>
         * Pseudo header is defined by RFC 2460 - Clause 8.1
         *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         *  |                                                               |
         *  +                                                               +
         *  |                                                               |
         *  +                         Source Address                        +
         *  |                                                               |
         *  +                                                               +
         *  |                                                               |
         *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         *  |                                                               |
         *  +                                                               +
         *  |                                                               |
         *  +                      Destination Address                      +
         *  |                                                               |
         *  +                                                               +
         *  |                                                               |
         *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         *  |                   Upper-Layer Packet Length                   |
         *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         *  |                      zero                     |  Next Header  |
         *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         * </pre>
         */
        external function fx_computeIPv6CheckSum( 
            in template (value) Ipv6Address p_sourceAddress, 
            in template (value) Ipv6Address p_destinationAddress, 
            in template (value) UInt8 p_nextHdr, 
            in template (value) integer p_payloadLength 
        ) return Oct2; 
        
    } // End of group externalFunctions

} // end LibItsIpv6OverGeoNetworking_Functions
 No newline at end of file