You copied the Doc URL to your clipboard.

10.3.3. icmpEcho()

The icmpEcho() routine sends an ICMP echo request.

Syntax

int icmpEcho(ip_addr host, char *data, unsigned length, unshort pingseq);

where:

host

Is the host to ping (32-bit, local-endian).

*data

Is the ping data. This is set to NULL in a don’t care case.

length

Is the total desired length of the packet on media.

pingseq

Is the ping sequence number.

Usage

This routine is callable from applications. It sends a single ping (ICMP echo request) to the specified host. The application must provide an appropriate pingDemux() routine if ping replies are to be checked.

Return values

Returns one of the following values:

0

If the transmission was successful.

ENP_ code

If an error occurred (see ENP_ error codes).

Location

The icmp_destun() routine is found in the following file:

inet\ping.c

Was this page helpful? Yes No