Skip to main contentA664isICMP
Valid for: CANoe DE • CANoe4SW DE
Function Syntax
long A664isICMP (a664Frame aFrame, dbNode NodeName)
long A664isICMP (a664Frame aFrame, dword dstIP, word VLid)
Description
This function returns the ICMP type and code for a packet. The intended use case is a check for an expected ICMP packet in an on-handler. The packet is checked according to the following rules:
- IP protocol number is set to 1
- VL of parameter
aFrame (selector EthVlId) corresponds to
- calling convention (1): DBC attribute ICMP_inVLid
- calling convention (2): parameter
VLid
- destination IP address of parameter
aFrame (selector IpAdrDst) corresponds to
- calling convention (1): DBC attribute ICMP_destIP
- calling convention (2): parameter
dstIp
Parameters
- aFrame: The frame object of type a664Frame to be checked.
- NodeName: (1) This is the name of a node from the assigned DBC. The DBC must be an AFDX DBC file and the necessary attributes must exist.
- dstIP: (2) destination IP address to be used for check.
- VLid: (2) VLId to be used for check.
Return Values
<success>: 0x0000<ICMP type><ICMP code>
0x00000000: Ping Request received (type = 0; code = 0);
0x00000800: Echo Reply received (type = 8; code = 0);
<error> -1: IP protocol is not ICMP
<error> -2: no ICMP attributes found for NodeName
<error> -3: invalid IP address value
<error> -4: unsupported ICMP type
<error> -6: invalid VL value
Example
—