1#ifndef _GPXE_ICMP6_H
2#define _GPXE_ICMP6_H
3
4/** @file
5 *
6 * ICMP6 protocol
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER );
11
12#include <gpxe/ip6.h>
13#include <gpxe/ndp.h>
14
15#define ICMP6_NSOLICIT 135
16#define ICMP6_NADVERT 136
17
18extern struct tcpip_protocol icmp6_protocol;
19
20struct icmp6_header {
21	uint8_t type;
22	uint8_t code;
23	uint16_t csum;
24	/* Message body */
25};
26
27struct neighbour_solicit {
28	uint8_t type;
29	uint8_t code;
30	uint16_t csum;
31	uint32_t reserved;
32	struct in6_addr target;
33	/* "Compulsory" options */
34	uint8_t opt_type;
35	uint8_t opt_len;
36  /* FIXME:  hack alert */
37	uint8_t opt_ll_addr[6];
38};
39
40struct neighbour_advert {
41	uint8_t type;
42	uint8_t code;
43	uint16_t csum;
44	uint8_t flags;
45	uint8_t reserved;
46	struct in6_addr target;
47	uint8_t opt_type;
48	uint8_t opt_len;
49  /* FIXME:  hack alert */
50	uint8_t opt_ll_addr[6];
51};
52
53#define ICMP6_FLAGS_ROUTER 0x80
54#define ICMP6_FLAGS_SOLICITED 0x40
55#define ICMP6_FLAGS_OVERRIDE 0x20
56
57int icmp6_send_solicit ( struct net_device *netdev, struct in6_addr *src, struct in6_addr *dest );
58
59#endif /* _GPXE_ICMP6_H */
60