Contiki 3.x
uip-nd6.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006, Swedish Institute of Computer Science.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the Institute nor the names of its contributors
14  * may be used to endorse or promote products derived from this software
15  * without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  * This file is part of the Contiki operating system.
30  *
31  */
32 
33 /**
34  * \file
35  * Neighbor discovery (RFC 4861)
36  * \author Julien Abeille <jabeille@cisco.com>
37  * \author Mathilde Durvy <mdurvy@cisco.com>
38  */
39 
40 /**
41  * \addtogroup uip6
42  * @{
43  */
44 
45 #ifndef UIP_ND6_H_
46 #define UIP_ND6_H_
47 
48 #include "net/ip/uip.h"
49 #include "sys/stimer.h"
50 /**
51  * \name General
52  * @{
53  */
54 /** \brief HOP LIMIT to be used when sending ND messages (255) */
55 #define UIP_ND6_HOP_LIMIT 255
56 /** \brief INFINITE lifetime */
57 #define UIP_ND6_INFINITE_LIFETIME 0xFFFFFFFF
58 /** @} */
59 
60 /** \name RFC 4861 Host constant */
61 /** @{ */
62 #define UIP_ND6_MAX_RTR_SOLICITATION_DELAY 1
63 #define UIP_ND6_RTR_SOLICITATION_INTERVAL 4
64 #define UIP_ND6_MAX_RTR_SOLICITATIONS 3
65 /** @} */
66 
67 /** \name RFC 4861 Router constants */
68 /** @{ */
69 #ifndef UIP_CONF_ND6_SEND_RA
70 #define UIP_ND6_SEND_RA 1 /* enable/disable RA sending */
71 #else
72 #define UIP_ND6_SEND_RA UIP_CONF_ND6_SEND_RA
73 #endif
74 #ifndef UIP_CONF_ND6_SEND_NA
75 #define UIP_ND6_SEND_NA 1 /* enable/disable NA sending */
76 #else
77 #define UIP_ND6_SEND_NA UIP_CONF_ND6_SEND_NA
78 #endif
79 #define UIP_ND6_MAX_RA_INTERVAL 600
80 #define UIP_ND6_MIN_RA_INTERVAL (UIP_ND6_MAX_RA_INTERVAL / 3)
81 #define UIP_ND6_M_FLAG 0
82 #define UIP_ND6_O_FLAG 0
83 #define UIP_ND6_ROUTER_LIFETIME 3 * UIP_ND6_MAX_RA_INTERVAL
84 
85 #define UIP_ND6_MAX_INITIAL_RA_INTERVAL 16 /*seconds*/
86 #define UIP_ND6_MAX_INITIAL_RAS 3 /*transmissions*/
87 #define UIP_ND6_MIN_DELAY_BETWEEN_RAS 3 /*seconds*/
88 //#define UIP_ND6_MAX_RA_DELAY_TIME 0.5 /*seconds*/
89 #define UIP_ND6_MAX_RA_DELAY_TIME_MS 500 /*milli seconds*/
90 /** @} */
91 
92 #ifndef UIP_CONF_ND6_DEF_MAXDADNS
93 /** \brief Do not try DAD when using EUI-64 as allowed by draft-ietf-6lowpan-nd-15 section 8.2 */
94 #if UIP_CONF_LL_802154
95 #define UIP_ND6_DEF_MAXDADNS 0
96 #else /* UIP_CONF_LL_802154 */
97 #define UIP_ND6_DEF_MAXDADNS UIP_ND6_SEND_NA
98 #endif /* UIP_CONF_LL_802154 */
99 #else /* UIP_CONF_ND6_DEF_MAXDADNS */
100 #define UIP_ND6_DEF_MAXDADNS UIP_CONF_ND6_DEF_MAXDADNS
101 #endif /* UIP_CONF_ND6_DEF_MAXDADNS */
102 
103 /** \name RFC 4861 Node constant */
104 #define UIP_ND6_MAX_MULTICAST_SOLICIT 3
105 
106 #ifdef UIP_CONF_ND6_MAX_UNICAST_SOLICIT
107 #define UIP_ND6_MAX_UNICAST_SOLICIT UIP_CONF_ND6_MAX_UNICAST_SOLICIT
108 #else /* UIP_CONF_ND6_MAX_UNICAST_SOLICIT */
109 #define UIP_ND6_MAX_UNICAST_SOLICIT 3
110 #endif /* UIP_CONF_ND6_MAX_UNICAST_SOLICIT */
111 
112 #ifdef UIP_CONF_ND6_REACHABLE_TIME
113 #define UIP_ND6_REACHABLE_TIME UIP_CONF_ND6_REACHABLE_TIME
114 #else
115 #define UIP_ND6_REACHABLE_TIME 30000
116 #endif
117 
118 #ifdef UIP_CONF_ND6_RETRANS_TIMER
119 #define UIP_ND6_RETRANS_TIMER UIP_CONF_ND6_RETRANS_TIMER
120 #else
121 #define UIP_ND6_RETRANS_TIMER 1000
122 #endif
123 
124 #define UIP_ND6_DELAY_FIRST_PROBE_TIME 5
125 #define UIP_ND6_MIN_RANDOM_FACTOR(x) (x / 2)
126 #define UIP_ND6_MAX_RANDOM_FACTOR(x) ((x) + (x) / 2)
127 /** @} */
128 
129 
130 /** \name ND6 option types */
131 /** @{ */
132 #define UIP_ND6_OPT_SLLAO 1
133 #define UIP_ND6_OPT_TLLAO 2
134 #define UIP_ND6_OPT_PREFIX_INFO 3
135 #define UIP_ND6_OPT_REDIRECTED_HDR 4
136 #define UIP_ND6_OPT_MTU 5
137 /** @} */
138 
139 /** \name ND6 option types */
140 /** @{ */
141 #define UIP_ND6_OPT_TYPE_OFFSET 0
142 #define UIP_ND6_OPT_LEN_OFFSET 1
143 #define UIP_ND6_OPT_DATA_OFFSET 2
144 
145 /** \name ND6 message length (excluding options) */
146 /** @{ */
147 #define UIP_ND6_NA_LEN 20
148 #define UIP_ND6_NS_LEN 20
149 #define UIP_ND6_RA_LEN 12
150 #define UIP_ND6_RS_LEN 4
151 /** @} */
152 
153 
154 /** \name ND6 option length in bytes */
155 /** @{ */
156 #define UIP_ND6_OPT_HDR_LEN 2
157 #define UIP_ND6_OPT_PREFIX_INFO_LEN 32
158 #define UIP_ND6_OPT_MTU_LEN 8
159 
160 
161 /* Length of TLLAO and SLLAO options, it is L2 dependant */
162 #if UIP_CONF_LL_802154
163 /* If the interface is 802.15.4. For now we use only long addresses */
164 #define UIP_ND6_OPT_SHORT_LLAO_LEN 8
165 #define UIP_ND6_OPT_LONG_LLAO_LEN 16
166 /** \brief length of a ND6 LLAO option for 802.15.4 */
167 #define UIP_ND6_OPT_LLAO_LEN UIP_ND6_OPT_LONG_LLAO_LEN
168 #else /*UIP_CONF_LL_802154*/
169 #if UIP_CONF_LL_80211
170 /* If the interface is 802.11 */
171 /** \brief length of a ND6 LLAO option for 802.11 */
172 #define UIP_ND6_OPT_LLAO_LEN 8
173 #else /*UIP_CONF_LL_80211*/
174 /** \brief length of a ND6 LLAO option for default L2 type (e.g. Ethernet) */
175 #define UIP_ND6_OPT_LLAO_LEN 8
176 #endif /*UIP_CONF_LL_80211*/
177 #endif /*UIP_CONF_LL_802154*/
178 /** @} */
179 
180 
181 /** \name Neighbor Advertisement flags masks */
182 /** @{ */
183 #define UIP_ND6_NA_FLAG_ROUTER 0x80
184 #define UIP_ND6_NA_FLAG_SOLICITED 0x40
185 #define UIP_ND6_NA_FLAG_OVERRIDE 0x20
186 #define UIP_ND6_RA_FLAG_ONLINK 0x80
187 #define UIP_ND6_RA_FLAG_AUTONOMOUS 0x40
188 /** @} */
189 
190 /**
191  * \name ND message structures
192  * @{
193  */
194 
195 /**
196  * \brief A neighbor solicitation constant part
197  *
198  * Possible option is: SLLAO
199  */
200 typedef struct uip_nd6_ns {
201  uint32_t reserved;
202  uip_ipaddr_t tgtipaddr;
203 } uip_nd6_ns;
204 
205 /**
206  * \brief A neighbor advertisement constant part.
207  *
208  * Possible option is: TLLAO
209  */
210 typedef struct uip_nd6_na {
211  uint8_t flagsreserved;
212  uint8_t reserved[3];
213  uip_ipaddr_t tgtipaddr;
214 } uip_nd6_na;
215 
216 /**
217  * \brief A router solicitation constant part
218  *
219  * Possible option is: SLLAO
220  */
221 typedef struct uip_nd6_rs {
222  uint32_t reserved;
223 } uip_nd6_rs;
224 
225 /**
226  * \brief A router advertisement constant part
227  *
228  * Possible options are: SLLAO, MTU, Prefix Information
229  */
230 typedef struct uip_nd6_ra {
231  uint8_t cur_ttl;
232  uint8_t flags_reserved;
233  uint16_t router_lifetime;
234  uint32_t reachable_time;
235  uint32_t retrans_timer;
236 } uip_nd6_ra;
237 
238 /**
239  * \brief A redirect message constant part
240  *
241  * Possible options are: TLLAO, redirected header
242  */
243 typedef struct uip_nd6_redirect {
244  uint32_t reserved;
245  uip_ipaddr_t tgtipaddress;
246  uip_ipaddr_t destipaddress;
248 /** @} */
249 
250 /**
251  * \name ND Option structures
252  * @{
253  */
254 
255 /** \brief ND option header */
256 typedef struct uip_nd6_opt_hdr {
257  uint8_t type;
258  uint8_t len;
260 
261 /** \brief ND option prefix information */
262 typedef struct uip_nd6_opt_prefix_info {
263  uint8_t type;
264  uint8_t len;
265  uint8_t preflen;
266  uint8_t flagsreserved1;
267  uint32_t validlt;
268  uint32_t preferredlt;
269  uint32_t reserved2;
270  uip_ipaddr_t prefix;
272 
273 /** \brief ND option MTU */
274 typedef struct uip_nd6_opt_mtu {
275  uint8_t type;
276  uint8_t len;
277  uint16_t reserved;
278  uint32_t mtu;
280 
281 /** \struct Redirected header option */
282 typedef struct uip_nd6_opt_redirected_hdr {
283  uint8_t type;
284  uint8_t len;
285  uint8_t reserved[6];
286 } uip_nd6_opt_redirected_hdr;
287 /** @} */
288 
289 /**
290  * \name ND Messages Processing and Generation
291  * @{
292  */
293  /**
294  * \brief Process a neighbor solicitation
295  *
296  * The NS can be received in 3 cases (procedures):
297  * - sender is performing DAD (ip src = unspecified, no SLLAO option)
298  * - sender is performing NUD (ip dst = unicast)
299  * - sender is performing address resolution (ip dest = solicited node mcast
300  * address)
301  *
302  * We do:
303  * - if the tgt belongs to me, reply, otherwise ignore
304  * - if i was performing DAD for the same address, two cases:
305  * -- I already sent a NS, hence I win
306  * -- I did not send a NS yet, hence I lose
307  *
308  * If we need to send a NA in response (i.e. the NS was done for NUD, or
309  * address resolution, or DAD and there is a conflict), we do it in this
310  * function: set src, dst, tgt address in the three cases, then for all cases
311  * set the rest, including SLLAO
312  *
313  */
314 void
315 uip_nd6_ns_input(void);
316 
317 /**
318  * \brief Send a neighbor solicitation, send a Neighbor Advertisement
319  * \param src pointer to the src of the NS if known
320  * \param dest pointer to ip address to send the NS, for DAD or ADDR Resol,
321  * MUST be NULL, for NUD, must be correct unicast dest
322  * \param tgt pointer to ip address to fill the target address field, must
323  * not be NULL
324  *
325  * - RFC 4861, 7.2.2 :
326  * "If the source address of the packet prompting the solicitation is the
327  * same as one of the addresses assigned to the outgoing interface, that
328  * address SHOULD be placed in the IP Source Address of the outgoing
329  * solicitation. Otherwise, any one of the addresses assigned to the
330  * interface should be used."
331  * This is why we have a src ip address as argument. If NULL, we will do
332  * src address selection, otherwise we use the argument.
333  *
334  * - we check if it is a NS for Address resolution or NUD, if yes we include
335  * a SLLAO option, otherwise no.
336  */
337 void
338 uip_nd6_ns_output(uip_ipaddr_t *src, uip_ipaddr_t *dest, uip_ipaddr_t *tgt);
339 
340 #if UIP_CONF_ROUTER
341 #if UIP_ND6_SEND_RA
342 /**
343  * \brief send a Router Advertisement
344  *
345  * Only for router, for periodic as well as sollicited RA
346  */
347 void uip_nd6_ra_output(uip_ipaddr_t *dest);
348 #endif /* UIP_ND6_SEND_RA */
349 #endif /*UIP_CONF_ROUTER*/
350 
351 /**
352  * \brief Send a Router Solicitation
353  *
354  * src is chosen through the uip_netif_select_src function. If src is
355  * unspecified (i.e. we do not have a preferred address yet), then we do not
356  * put a SLLAO option (MUST NOT in RFC 4861). Otherwise we do.
357  *
358  * RS message format,
359  * possible option is SLLAO, MUST NOT be included if source = unspecified
360  * SHOULD be included otherwise
361  */
362 void uip_nd6_rs_output(void);
363 
364 /**
365  * \brief Initialise the uIP ND core
366  */
367 void uip_nd6_init(void);
368 /** @} */
369 
370 
371 void
372 uip_appserver_addr_get(uip_ipaddr_t *ipaddr);
373 /*--------------------------------------*/
374 /******* ANNEX - message formats ********/
375 /*--------------------------------------*/
376 
377 /*
378  * RS format. possible option is SLLAO
379  * 0 1 2 3
380  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
381  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
382  * | Type | Code | Checksum |
383  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
384  * | Reserved |
385  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
386  * | Options ...
387  * +-+-+-+-+-+-+-+-+-+-+-+-
388  *
389  *
390  * RA format. possible options: prefix information, MTU, SLLAO
391  * 0 1 2 3
392  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
393  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
394  * | Type | Code | Checksum |
395  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
396  * | Cur Hop Limit |M|O| Reserved | Router Lifetime |
397  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
398  * | Reachable Time |
399  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
400  * | Retrans Timer |
401  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
402  * | Options ...
403  * +-+-+-+-+-+-+-+-+-+-+-+-
404  *
405  *
406  * NS format: options should be SLLAO
407  * 0 1 2 3
408  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
409  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
410  * | Type | Code | Checksum |
411  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
412  * | Reserved |
413  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
414  * | |
415  * + +
416  * | |
417  * + Target Address +
418  * | |
419  * + +
420  * | |
421  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
422  * | Options ...
423  * +-+-+-+-+-+-+-+-+-+-+-+-
424  *
425  *
426  * NA message format. possible options is TLLAO
427  *
428  * 0 1 2 3
429  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
430  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
431  * | Type | Code | Checksum |
432  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
433  * |R|S|O| Reserved |
434  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
435  * | |
436  * + +
437  * | |
438  * + Target Address +
439  * | |
440  * + +
441  * | |
442  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
443  * | Options ...
444  * +-+-+-+-+-+-+-+-+-+-+-+-
445  *
446  *
447  * Redirect message format. Possible options are TLLAO and Redirected header
448  *
449  * 0 1 2 3
450  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
451  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
452  * | Type | Code | Checksum |
453  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
454  * | Reserved |
455  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
456  * | |
457  * + +
458  * | |
459  * + Target Address +
460  * | |
461  * + +
462  * | |
463  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
464  * | |
465  * + +
466  * | |
467  * + Destination Address +
468  * | |
469  * + +
470  * | |
471  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
472  * | Options ...
473  * +-+-+-+-+-+-+-+-+-+-+-+-
474  *
475  *
476  * SLLAO/TLLAO option:
477  * 0 1 2 3
478  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
479  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
480  * | Type | Length | Link-Layer Address ...
481  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
482  *
483  *
484  * Prefix information option
485  * 0 1 2 3
486  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
487  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
488  * | Type | Length | Prefix Length |L|A| Reserved1 |
489  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
490  * | Valid Lifetime |
491  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
492  * | Preferred Lifetime |
493  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
494  * | Reserved2 |
495  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
496  * | |
497  * + +
498  * | |
499  * + Prefix +
500  * | |
501  * + +
502  * | |
503  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
504  *
505  *
506  * MTU option
507  * 0 1 2 3
508  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
509  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
510  * | Type | Length | Reserved |
511  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
512  * | MTU |
513  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
514  *
515  *
516  * Redirected header option
517  *
518  * 0 1 2 3
519  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
520  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
521  * | Type | Length | Reserved |
522  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
523  * | Reserved |
524  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
525  * | |
526  * ~ IP header + data ~
527  * | |
528  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
529  *
530  */
531 #endif /* UIP_ND6_H_ */
532 
533 /** @} */
Second timer library header file.
A router advertisement constant part.
Definition: uip-nd6.h:230
struct uip_nd6_opt_prefix_info uip_nd6_opt_prefix_info
ND option prefix information.
ND option MTU.
Definition: uip-nd6.h:274
struct uip_nd6_opt_hdr uip_nd6_opt_hdr
ND option header.
Header file for the uIP TCP/IP stack.
void uip_nd6_rs_output(void)
Send a Router Solicitation.
Definition: uip-nd6.c:740
ND option prefix information.
Definition: uip-nd6.h:262
void uip_nd6_ns_input(void)
Process a neighbor solicitation.
ND option header.
Definition: uip-nd6.h:256
struct uip_nd6_rs uip_nd6_rs
A router solicitation constant part.
void uip_nd6_init()
Initialise the uIP ND core.
Definition: uip-nd6.c:1011
A router solicitation constant part.
Definition: uip-nd6.h:221
A neighbor solicitation constant part.
Definition: uip-nd6.h:200
struct uip_nd6_na uip_nd6_na
A neighbor advertisement constant part.
A redirect message constant part.
Definition: uip-nd6.h:243
struct uip_nd6_ra uip_nd6_ra
A router advertisement constant part.
struct uip_nd6_redirect uip_nd6_redirect
A redirect message constant part.
struct uip_nd6_ns uip_nd6_ns
A neighbor solicitation constant part.
struct uip_nd6_opt_mtu uip_nd6_opt_mtu
ND option MTU.
void uip_nd6_ns_output(uip_ipaddr_t *src, uip_ipaddr_t *dest, uip_ipaddr_t *tgt)
Send a neighbor solicitation, send a Neighbor Advertisement.
Definition: uip-nd6.c:328
A neighbor advertisement constant part.
Definition: uip-nd6.h:210