Embedded TCP/IP stack  3.9.3
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_poll_service() 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.

Note
The PING service uses the RAW sockets.

Configuration parameters:

Data Structures

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

Typedefs

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

Enumerations

Functions

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-2017 by Andrey Butok. http://fnet.sourceforge.net