Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / icmpv6.h
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 );
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 */
19 struct 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 echo request */
44 #define ICMPV6_ECHO_REQUEST 128
45
46 /** ICMPv6 echo reply */
47 #define ICMPV6_ECHO_REPLY 129
48
49 /** ICMPv6 router solicitation */
50 #define ICMPV6_ROUTER_SOLICITATION 133
51
52 /** ICMPv6 router advertisement */
53 #define ICMPV6_ROUTER_ADVERTISEMENT 134
54
55 /** ICMPv6 neighbour solicitation */
56 #define ICMPV6_NEIGHBOUR_SOLICITATION 135
57
58 /** ICMPv6 neighbour advertisement */
59 #define ICMPV6_NEIGHBOUR_ADVERTISEMENT 136
60
61 extern struct tcpip_protocol icmpv6_protocol __tcpip_protocol;
62
63 #endif /* _IPXE_ICMP6_H */