iPXE
icmpv6.h
Go to the documentation of this file.
00001 #ifndef _IPXE_ICMP6_H
00002 #define _IPXE_ICMP6_H
00003 
00004 /** @file
00005  *
00006  * ICMPv6 protocol
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <stdint.h>
00013 #include <ipxe/tables.h>
00014 #include <ipxe/iobuf.h>
00015 #include <ipxe/netdevice.h>
00016 #include <ipxe/icmp.h>
00017 
00018 /** An ICMPv6 handler */
00019 struct icmpv6_handler {
00020         /** Type */
00021         unsigned int type;
00022         /** Process received packet
00023          *
00024          * @v iobuf             I/O buffer
00025          * @v netdev            Network device
00026          * @v sin6_src          Source socket address
00027          * @v sin6_dest         Destination socket address
00028          * @ret rc              Return status code
00029          *
00030          * This function takes ownership of the I/O buffer.
00031          */
00032         int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev,
00033                        struct sockaddr_in6 *sin6_src,
00034                        struct sockaddr_in6 *sin6_dest );
00035 };
00036 
00037 /** ICMPv6 handler table */
00038 #define ICMPV6_HANDLERS __table ( struct icmpv6_handler, "icmpv6_handlers" )
00039 
00040 /** Declare an ICMPv6 handler */
00041 #define __icmpv6_handler __table_entry ( ICMPV6_HANDLERS, 01 )
00042 
00043 /** ICMPv6 destination unreachable */
00044 #define ICMPV6_DESTINATION_UNREACHABLE 1
00045 
00046 /** ICMPv6 packet too big */
00047 #define ICMPV6_PACKET_TOO_BIG 2
00048 
00049 /** ICMPv6 time exceeded */
00050 #define ICMPV6_TIME_EXCEEDED 3
00051 
00052 /** ICMPv6 parameter problem */
00053 #define ICMPV6_PARAMETER_PROBLEM 4
00054 
00055 /** ICMPv6 echo request */
00056 #define ICMPV6_ECHO_REQUEST 128
00057 
00058 /** ICMPv6 echo reply */
00059 #define ICMPV6_ECHO_REPLY 129
00060 
00061 /** ICMPv6 router solicitation */
00062 #define ICMPV6_ROUTER_SOLICITATION 133
00063 
00064 /** ICMPv6 router advertisement */
00065 #define ICMPV6_ROUTER_ADVERTISEMENT 134
00066 
00067 /** ICMPv6 neighbour solicitation */
00068 #define ICMPV6_NEIGHBOUR_SOLICITATION 135
00069 
00070 /** ICMPv6 neighbour advertisement */
00071 #define ICMPV6_NEIGHBOUR_ADVERTISEMENT 136
00072 
00073 extern struct tcpip_protocol icmpv6_protocol __tcpip_protocol;
00074 
00075 #endif /* _IPXE_ICMP6_H */