Transmit an ICMPv4 or ICMPv6 echo request message.
Files
net_icmp.h/net_icmp.c
Prototype
Arguments
p_addr_dest
Pointer to IP destination address to send the ICMP echo request.
addr_len
IP address length:
NET_IPv4_ADDR_SIZE
NET_IPv6_ADDR_SIZE
timeout_ms
Timeout value to wait for ICMP echo response
p_data
Pointer to a configuration structure used to configure the device hardware for the specific network interface (see also Chapter 5, “Network Interface Configuration”).
data_len
Number of data buffer octets to include in the ICMP echo request.
p_err
Pointer to variable that will receive the return error code from this function:
NET_ICMP_ERR_NONE
NET_ERR_INVALID_ADDR
NET_ERR_FAULT_MEM_ALLOC
NET_ICMP_ERR_ECHO_REQ_TIMEOUT
NET_ICMP_ERR_ECHO_REQ_SIGNAL_FAULT
NET_ICMP_ERR_ECHO_REPLY_DATA_CMP_FAIL
Returned Value
DEF_OK
, if ICMP echo request message successfully sent to remote host.DEF_FAIL
, otherwise.
Required Configuration
None.
Notes / Warnings
None.