diff options
author | Michael Brown <mcb30@ipxe.org> | 2013-10-21 14:17:47 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2013-10-21 15:08:18 +0100 |
commit | c597c7a071f6dd42233b53012133e861e794c9c8 (patch) | |
tree | a2f56bff15790784b577d71a0e10db694cf76f16 /src/include/ipxe/pinger.h | |
parent | 46873eda443e7428624dcf91a7ad6f773d1d35bc (diff) | |
download | ipxe-c597c7a071f6dd42233b53012133e861e794c9c8.tar.gz |
[ping] Add generic ping mechanism
Add generic pinger mechanism (analogous to the generic downloader
mechanism) which opens a ping socket, transmits ping requests, and
passes information about ping replies to a callback function.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/pinger.h')
-rw-r--r-- | src/include/ipxe/pinger.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/ipxe/pinger.h b/src/include/ipxe/pinger.h new file mode 100644 index 000000000..2d8403313 --- /dev/null +++ b/src/include/ipxe/pinger.h @@ -0,0 +1,23 @@ +#ifndef _IPXE_PINGER_H +#define _IPXE_PINGER_H + +/** @file + * + * ICMP ping sender + * + */ + +FILE_LICENCE ( GPL2_OR_LATER ); + +#include <stdint.h> +#include <ipxe/interface.h> +#include <ipxe/socket.h> + +extern int create_pinger ( struct interface *job, const char *hostname, + unsigned long timeout, size_t len, + void ( * callback ) ( struct sockaddr *peer, + unsigned int sequence, + size_t len, + int rc ) ); + +#endif /* _IPXE_PINGER_H */ |