Embedded TCP/IP stack  4.1.0
PING service API

Detailed Description

The PING service is used to test if a system can communicate over the network with another device or computer.
It operates by sending Internet Control Message Protocol (ICMPv4/v6) Echo Request messages to the destination device and waiting for a response.
After the PING service is initialized the fnet_ping_request() function, the user application should call the main service-polling function fnet_service_poll() periodically in background.
When correct echo response is received, the PING service passes an echo-reply socket address to the fnet_ping_callback_t callback function.
For the PING service usage example, refer to the FNET Shell demo source code.

The PING service uses the RAW sockets.

Configuration parameters:

Data Structures

struct  fnet_ping_params
 Initialization parameters for the fnet_ping_request() function. More...


typedef void(* fnet_ping_callback_t) (fnet_error_t result, fnet_size_t packet_count, struct fnet_sockaddr *target_addr, void *cookie)
 Prototype of the PING-service callback function that is called when the PING-service has completed the requesting. More...



fnet_return_t fnet_ping_request (struct fnet_ping_params *params)
 Initializes PING service. More...
void fnet_ping_release (void)
 Releases the PING service. More...
fnet_ping_state_t fnet_ping_state (void)
 Retrieves the current state of the PING service (for debugging purposes). More...

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net