64 if (
len <
sizeof ( *icmp ) ) {
65 DBG (
"ICMP packet too short at %zd bytes (min %zd bytes)\n",
66 len,
sizeof ( *icmp ) );
74 DBG (
"ICMP checksum incorrect (is %04x, should be 0000)\n",
86 &icmpv4_echo_protocol );
90 DBG (
"ICMP ignoring type %d\n",
type );
112 .tcpip_protocol = &icmpv4_protocol,
struct arbelprm_rc_send_wqe rc
uint32_t type
Operating system type.
static struct net_device * netdev
#define AF_INET
IPv4 Internet addresses.
#define __unused
Declare a variable or data structure as unused.
#define DBG(...)
Print a debugging message.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define EINVAL
Invalid argument.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
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.
int icmp_rx_echo_reply(struct io_buffer *iobuf, struct sockaddr_tcpip *st_src)
Process a received ICMP echo request.
#define ICMP_ECHO_REQUEST
#define __icmp_echo_protocol
Declare an ICMP echo protocol.
static int icmpv4_rx(struct io_buffer *iobuf, struct net_device *netdev __unused, struct sockaddr_tcpip *st_src, struct sockaddr_tcpip *st_dest __unused, uint16_t pshdr_csum __unused)
Process a received packet.
Transport-network layer interface.
#define __tcpip_protocol
Declare a TCP/IP transport-layer protocol.
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
void * data
Start of data.
A transport-layer protocol of the TCP/IP stack (eg.
uint16_t tcpip_chksum(const void *data, size_t len)
Calculate TCP/IP checkum.