Transmit an ICMPv4 or ICMPv6 echo request message.
Files
net_icmp.h/net_icmp.c
Prototype
Code Block |
---|
NET_IF_NBR NetICMP_TxEchoReq(CPU_INT08U *p_addr_dest,
NET_IP_ADDR_LEN addr_len,
CPU_INT32U timeout_ms,
void *p_data,
CPU_INT16U data_len,
NET_ERR *p_err); |
Arguments
p_addr_dest
Pointer to IP destination address to send the ICMP echo request.
...
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”)the data buffer to include in the ICMP echo request.
data_len
Number of data buffer octets to include in the ICMP echo request.
...
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
NET_ICMP_ERR_LOCK_ACQUIRE
NET_ERR_FAULT_LOCK_ACQUIRE
NET_INIT_ERR_NOT_COMPLETED
NET_ICMPv4_ERR_INVALID_PTR
NET_ICMPv6_ERR_INVALID_PTR
NET_ERR_TX
NET_ERR_TX_BUF_NONE_AVAIL
NET_ERR_IF_LOOPBACK_DIS
NET_ERR_IF_LINK_DOWN
NET_ICMPv6_ERR_TX_INVALID_ADDR_SRC
Returned Value
DEF_OK
, if ICMP echo request message successfully sent to remote host and echo response received successfully.DEF_FAIL
, otherwise.
Required Configuration
None.
Notes / Warnings
None.