00001 #ifndef _GPXE_ICMP6_H 00002 #define _GPXE_ICMP6_H 00003 00004 /** @file 00005 * 00006 * ICMP6 protocol 00007 * 00008 */ 00009 00010 FILE_LICENCE ( GPL2_OR_LATER ); 00011 00012 #include <gpxe/ip6.h> 00013 #include <gpxe/ndp.h> 00014 00015 #define ICMP6_NSOLICIT 135 00016 #define ICMP6_NADVERT 136 00017 00018 extern struct tcpip_protocol icmp6_protocol; 00019 00020 struct icmp6_header { 00021 uint8_t type; 00022 uint8_t code; 00023 uint16_t csum; 00024 /* Message body */ 00025 }; 00026 00027 struct neighbour_solicit { 00028 uint8_t type; 00029 uint8_t code; 00030 uint16_t csum; 00031 uint32_t reserved; 00032 struct in6_addr target; 00033 /* "Compulsory" options */ 00034 uint8_t opt_type; 00035 uint8_t opt_len; 00036 /* FIXME: hack alert */ 00037 uint8_t opt_ll_addr[6]; 00038 }; 00039 00040 struct neighbour_advert { 00041 uint8_t type; 00042 uint8_t code; 00043 uint16_t csum; 00044 uint8_t flags; 00045 uint8_t reserved; 00046 struct in6_addr target; 00047 uint8_t opt_type; 00048 uint8_t opt_len; 00049 /* FIXME: hack alert */ 00050 uint8_t opt_ll_addr[6]; 00051 }; 00052 00053 #define ICMP6_FLAGS_ROUTER 0x80 00054 #define ICMP6_FLAGS_SOLICITED 0x40 00055 #define ICMP6_FLAGS_OVERRIDE 0x20 00056 00057 int icmp6_send_solicit ( struct net_device *netdev, struct in6_addr *src, struct in6_addr *dest ); 00058 00059 #endif /* _GPXE_ICMP6_H */
1.5.7.1