iPXE
|
ICMP protocol. More...
#include <stdint.h>
#include <ipxe/iobuf.h>
#include <ipxe/socket.h>
#include <ipxe/tcpip.h>
#include <ipxe/tables.h>
Go to the source code of this file.
Data Structures | |
struct | icmp_header |
An ICMP header. More... | |
struct | icmp_echo |
An ICMP echo request/reply. More... | |
struct | icmp_echo_protocol |
An ICMP echo protocol. More... | |
Macros | |
#define | ICMP_ECHO_PROTOCOLS __table ( struct icmp_echo_protocol, "icmp_echo_protocols" ) |
ICMP echo protocol table. More... | |
#define | __icmp_echo_protocol __table_entry ( ICMP_ECHO_PROTOCOLS, 01 ) |
Declare an ICMP echo protocol. More... | |
#define | ICMP_ECHO_REPLY 0 |
#define | ICMP_ECHO_REQUEST 8 |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | icmp_tx_echo_request (struct io_buffer *iobuf, struct sockaddr_tcpip *st_dest) |
Transmit ICMP echo request. More... | |
int | icmp_rx_echo_request (struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, struct icmp_echo_protocol *echo_protocol) |
Process a received ICMP echo request. More... | |
int | icmp_rx_echo_reply (struct io_buffer *iobuf, struct sockaddr_tcpip *st_src) |
Process a received ICMP echo request. More... | |
ICMP protocol.
Definition in file icmp.h.
#define ICMP_ECHO_PROTOCOLS __table ( struct icmp_echo_protocol, "icmp_echo_protocols" ) |
struct icmp_echo_protocol icmpv6_echo_protocol __icmp_echo_protocol __table_entry ( ICMP_ECHO_PROTOCOLS, 01 ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int icmp_tx_echo_request | ( | struct io_buffer * | iobuf, |
struct sockaddr_tcpip * | st_dest | ||
) |
Transmit ICMP echo request.
iobuf | I/O buffer |
st_dest | Destination socket address |
rc | Return status code |
Definition at line 105 of file icmp.c.
References io_buffer::data, DBGC, echo(), ENOTSUP, free_iob(), icmp_echo_protocol(), icmp_tx_echo(), icmpcol(), ntohs, rc, icmp_echo_protocol::request, and sockaddr_tcpip::st_family.
Referenced by ping_deliver().
int icmp_rx_echo_request | ( | struct io_buffer * | iobuf, |
struct sockaddr_tcpip * | st_src, | ||
struct icmp_echo_protocol * | echo_protocol | ||
) |
Process a received ICMP echo request.
iobuf | I/O buffer |
st_src | Source socket address |
echo_protocol | ICMP echo protocol |
rc | Return status code |
Definition at line 165 of file icmp.c.
References io_buffer::data, DBGC, echo(), EINVAL, free_iob(), icmp_tx_echo_reply(), icmpcol(), iob_len(), ntohs, and rc.
Referenced by icmpv4_rx(), and icmpv6_rx_echo_request().
int icmp_rx_echo_reply | ( | struct io_buffer * | iobuf, |
struct sockaddr_tcpip * | st_src | ||
) |
Process a received ICMP echo request.
iobuf | I/O buffer |
st_src | Source socket address |
rc | Return status code |
Definition at line 196 of file icmp.c.
References io_buffer::data, DBGC, echo(), EINVAL, free_iob(), icmpcol(), iob_len(), ntohs, ping_rx(), and rc.
Referenced by icmpv4_rx(), and icmpv6_rx_echo_reply().