NetICMP_TxEchoReq
Transmit an ICMPv4 or ICMPv6 echo request message.
Files
net_icmp.h/net_icmp.c
Prototype
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.
addr_len
IP address length:
NET_IPv4_ADDR_SIZENET_IPv6_ADDR_SIZE
timeout_ms
Timeout value to wait for ICMP echo response
p_data
Pointer to the data buffer to include in the ICMP echo request.
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_NONENET_ERR_INVALID_ADDRNET_ERR_FAULT_MEM_ALLOCNET_ICMP_ERR_ECHO_REQ_TIMEOUTNET_ICMP_ERR_ECHO_REQ_SIGNAL_FAULTNET_ICMP_ERR_ECHO_REPLY_DATA_CMP_FAILNET_ICMP_ERR_LOCK_ACQUIRENET_ERR_FAULT_LOCK_ACQUIRE NET_INIT_ERR_NOT_COMPLETEDNET_ICMPv4_ERR_INVALID_PTRNET_ICMPv6_ERR_INVALID_PTRNET_ERR_TXNET_ERR_TX_BUF_NONE_AVAILNET_ERR_IF_LOOPBACK_DISNET_ERR_IF_LINK_DOWNNET_ICMPv6_ERR_TX_INVALID_ADDR_SRC
Returned Value
DEF_OK, if ICMP echo request sent to remote host and echo response received successfully.DEF_FAIL, otherwise.
Required Configuration
None.
Notes / Warnings
None.