Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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 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_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 sent to remote host and echo response received successfully.

DEF_FAIL, otherwise.

Required Configuration

None.

Notes / Warnings

None.

  • No labels