10 FILE_LICENCE ( GPL2_OR_LATER );
13 #include <ipxe/tables.h>
14 #include <ipxe/iobuf.h>
15 #include <ipxe/netdevice.h>
16 #include <ipxe/icmp.h>
18 /** An ICMPv6 handler */
19 struct icmpv6_handler {
22 /** Process received packet
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
30 * This function takes ownership of the I/O buffer.
32 int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev,
33 struct sockaddr_in6 *sin6_src,
34 struct sockaddr_in6 *sin6_dest );
37 /** ICMPv6 handler table */
38 #define ICMPV6_HANDLERS __table ( struct icmpv6_handler, "icmpv6_handlers" )
40 /** Declare an ICMPv6 handler */
41 #define __icmpv6_handler __table_entry ( ICMPV6_HANDLERS, 01 )
43 /** ICMPv6 echo request */
44 #define ICMPV6_ECHO_REQUEST 128
46 /** ICMPv6 echo reply */
47 #define ICMPV6_ECHO_REPLY 129
49 /** ICMPv6 router solicitation */
50 #define ICMPV6_ROUTER_SOLICITATION 133
52 /** ICMPv6 router advertisement */
53 #define ICMPV6_ROUTER_ADVERTISEMENT 134
55 /** ICMPv6 neighbour solicitation */
56 #define ICMPV6_NEIGHBOUR_SOLICITATION 135
58 /** ICMPv6 neighbour advertisement */
59 #define ICMPV6_NEIGHBOUR_ADVERTISEMENT 136
61 extern struct tcpip_protocol icmpv6_protocol __tcpip_protocol;
63 #endif /* _IPXE_ICMP6_H */