iPXE
icmpv6.h
Go to the documentation of this file.
1#ifndef _IPXE_ICMP6_H
2#define _IPXE_ICMP6_H
3
4/** @file
5 *
6 * ICMPv6 protocol
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13#include <stdint.h>
14#include <ipxe/tables.h>
15#include <ipxe/iobuf.h>
16#include <ipxe/netdevice.h>
17#include <ipxe/icmp.h>
18
19/** An ICMPv6 handler */
21 /** Type */
22 unsigned int type;
23 /** Process received packet
24 *
25 * @v iobuf I/O buffer
26 * @v netdev Network device
27 * @v sin6_src Source socket address
28 * @v sin6_dest Destination socket address
29 * @ret rc Return status code
30 *
31 * This function takes ownership of the I/O buffer.
32 */
33 int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev,
34 struct sockaddr_in6 *sin6_src,
35 struct sockaddr_in6 *sin6_dest );
36};
37
38/** ICMPv6 handler table */
39#define ICMPV6_HANDLERS __table ( struct icmpv6_handler, "icmpv6_handlers" )
40
41/** Declare an ICMPv6 handler */
42#define __icmpv6_handler __table_entry ( ICMPV6_HANDLERS, 01 )
43
44/** ICMPv6 destination unreachable */
45#define ICMPV6_DESTINATION_UNREACHABLE 1
46
47/** ICMPv6 packet too big */
48#define ICMPV6_PACKET_TOO_BIG 2
49
50/** ICMPv6 time exceeded */
51#define ICMPV6_TIME_EXCEEDED 3
52
53/** ICMPv6 parameter problem */
54#define ICMPV6_PARAMETER_PROBLEM 4
55
56/** ICMPv6 echo request */
57#define ICMPV6_ECHO_REQUEST 128
58
59/** ICMPv6 echo reply */
60#define ICMPV6_ECHO_REPLY 129
61
62/** ICMPv6 router solicitation */
63#define ICMPV6_ROUTER_SOLICITATION 133
64
65/** ICMPv6 router advertisement */
66#define ICMPV6_ROUTER_ADVERTISEMENT 134
67
68/** ICMPv6 neighbour solicitation */
69#define ICMPV6_NEIGHBOUR_SOLICITATION 135
70
71/** ICMPv6 neighbour advertisement */
72#define ICMPV6_NEIGHBOUR_ADVERTISEMENT 136
73
74extern struct tcpip_protocol icmpv6_protocol __tcpip_protocol;
75
76#endif /* _IPXE_ICMP6_H */
static struct net_device * netdev
Definition gdbudp.c:53
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
ICMP protocol.
#define __tcpip_protocol
Declare a TCP/IP transport-layer protocol.
Definition tcpip.h:182
I/O buffers.
Network device management.
An ICMPv6 handler.
Definition icmpv6.h:20
int(* rx)(struct io_buffer *iobuf, struct net_device *netdev, struct sockaddr_in6 *sin6_src, struct sockaddr_in6 *sin6_dest)
Process received packet.
Definition icmpv6.h:33
unsigned int type
Type.
Definition icmpv6.h:22
A persistent I/O buffer.
Definition iobuf.h:38
A network device.
Definition netdevice.h:353
IPv6 socket address.
Definition in.h:118
A transport-layer protocol of the TCP/IP stack (eg.
Definition tcpip.h:105
Linker tables.