iPXE
|
ICMP ping management. More...
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <ipxe/pinger.h>
#include <ipxe/monojob.h>
#include <ipxe/timer.h>
#include <usr/pingmgmt.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | ping_callback (struct sockaddr *peer, unsigned int sequence, size_t len, int rc) |
Display ping result. More... | |
int | ping (const char *hostname, unsigned long timeout, size_t len, unsigned int count, int quiet) |
Ping a host. More... | |
ICMP ping management.
Definition in file pingmgmt.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Display ping result.
src | Source socket address, or NULL |
sequence | Sequence number |
len | Payload length |
rc | Status code |
Definition at line 48 of file pingmgmt.c.
References len, peer, printf(), rc, sock_ntoa(), and strerror().
Referenced by ping().
int ping | ( | const char * | hostname, |
unsigned long | timeout, | ||
size_t | len, | ||
unsigned int | count, | ||
int | quiet | ||
) |
Ping a host.
hostname | Hostname |
timeout | Timeout between pings, in ticks |
len | Payload length |
count | Number of packets to send (or zero for no limit) |
quiet | Inhibit output |
rc | Return status code |
Definition at line 69 of file pingmgmt.c.
References count, create_pinger(), len, monojob, monojob_wait(), NULL, ping_callback(), printf(), rc, strerror(), and timeout().
Referenced by ping_close(), ping_deliver(), ping_demux(), ping_exec(), ping_open(), and ping_rx().