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