10 FILE_LICENCE ( GPL2_OR_LATER );
13 #include <ipxe/iobuf.h>
14 #include <ipxe/socket.h>
15 #include <ipxe/tcpip.h>
16 #include <ipxe/tables.h>
26 } __attribute__ (( packed ));
28 /** An ICMP echo request/reply */
31 struct icmp_header icmp;
34 /** Sequence number */
38 } __attribute__ (( packed ));
40 /** An ICMP echo protocol */
41 struct icmp_echo_protocol {
48 /** TCP/IP protocol */
49 struct tcpip_protocol *tcpip_protocol;
50 /** Include network-layer checksum within packet */
54 /** ICMP echo protocol table */
55 #define ICMP_ECHO_PROTOCOLS \
56 __table ( struct icmp_echo_protocol, "icmp_echo_protocols" )
58 /** Declare an ICMP echo protocol */
59 #define __icmp_echo_protocol __table_entry ( ICMP_ECHO_PROTOCOLS, 01 )
61 #define ICMP_ECHO_REPLY 0
62 #define ICMP_ECHO_REQUEST 8
64 extern int icmp_tx_echo_request ( struct io_buffer *iobuf,
65 struct sockaddr_tcpip *st_dest );
67 extern int icmp_rx_echo_request ( struct io_buffer *iobuf,
68 struct sockaddr_tcpip *st_src,
69 struct icmp_echo_protocol *echo_protocol );
70 extern int icmp_rx_echo_reply ( struct io_buffer *iobuf,
71 struct sockaddr_tcpip *st_src );
73 #endif /* _IPXE_ICMP_H */