57 #define UIP_DS6_NBR_NBS 0
58 #ifndef UIP_CONF_DS6_NBR_NBU
59 #define UIP_DS6_NBR_NBU 4
61 #define UIP_DS6_NBR_NBU UIP_CONF_DS6_NBR_NBU
63 #define UIP_DS6_NBR_NB UIP_DS6_NBR_NBS + UIP_DS6_NBR_NBU
66 #define UIP_DS6_DEFRT_NBS 0
67 #ifndef UIP_CONF_DS6_DEFRT_NBU
68 #define UIP_DS6_DEFRT_NBU 2
70 #define UIP_DS6_DEFRT_NBU UIP_CONF_DS6_DEFRT_NBU
72 #define UIP_DS6_DEFRT_NB UIP_DS6_DEFRT_NBS + UIP_DS6_DEFRT_NBU
75 #define UIP_DS6_PREFIX_NBS 1
76 #ifndef UIP_CONF_DS6_PREFIX_NBU
77 #define UIP_DS6_PREFIX_NBU 2
79 #define UIP_DS6_PREFIX_NBU UIP_CONF_DS6_PREFIX_NBU
81 #define UIP_DS6_PREFIX_NB UIP_DS6_PREFIX_NBS + UIP_DS6_PREFIX_NBU
84 #define UIP_DS6_ROUTE_NBS 0
85 #ifndef UIP_CONF_DS6_ROUTE_NBU
86 #define UIP_DS6_ROUTE_NBU 4
88 #define UIP_DS6_ROUTE_NBU UIP_CONF_DS6_ROUTE_NBU
90 #define UIP_DS6_ROUTE_NB UIP_DS6_ROUTE_NBS + UIP_DS6_ROUTE_NBU
93 #define UIP_DS6_ADDR_NBS 1
94 #ifndef UIP_CONF_DS6_ADDR_NBU
95 #define UIP_DS6_ADDR_NBU 2
97 #define UIP_DS6_ADDR_NBU UIP_CONF_DS6_ADDR_NBU
99 #define UIP_DS6_ADDR_NB UIP_DS6_ADDR_NBS + UIP_DS6_ADDR_NBU
103 #define UIP_DS6_MADDR_NBS 2 + UIP_DS6_ADDR_NB
105 #define UIP_DS6_MADDR_NBS 1 + UIP_DS6_ADDR_NB
107 #ifndef UIP_CONF_DS6_MADDR_NBU
108 #define UIP_DS6_MADDR_NBU 0
110 #define UIP_DS6_MADDR_NBU UIP_CONF_DS6_MADDR_NBU
112 #define UIP_DS6_MADDR_NB UIP_DS6_MADDR_NBS + UIP_DS6_MADDR_NBU
116 #define UIP_DS6_AADDR_NBS UIP_DS6_PREFIX_NB - 1
118 #define UIP_DS6_AADDR_NBS 0
120 #ifndef UIP_CONF_DS6_AADDR_NBU
121 #define UIP_DS6_AADDR_NBU 0
123 #define UIP_DS6_AADDR_NBU UIP_CONF_DS6_AADDR_NBU
125 #define UIP_DS6_AADDR_NB UIP_DS6_AADDR_NBS + UIP_DS6_AADDR_NBU
130 #define NBR_INCOMPLETE 0
131 #define NBR_REACHABLE 1
137 #define ADDR_TENTATIVE 0
138 #define ADDR_PREFERRED 1
139 #define ADDR_DEPRECATED 2
142 #define ADDR_ANYTYPE 0
143 #define ADDR_AUTOCONF 1
145 #define ADDR_MANUAL 3
148 #define UIP_DS6_PERIOD (CLOCK_SECOND/10)
155 #if UIP_CONF_IPV6_QUEUE_PKT
156 #include "net/uip-packetqueue.h"
165 clock_time_t last_lookup;
169 #if UIP_CONF_IPV6_QUEUE_PKT
170 struct uip_packetqueue_handle packethandle;
171 #define UIP_DS6_NBR_PACKET_LIFETIME CLOCK_SECOND * 4
192 uint8_t l_a_reserved;
212 struct timer dadtimer;
230 #ifndef UIP_DS6_ROUTE_STATE_TYPE
231 #define UIP_DS6_ROUTE_STATE_TYPE rpl_route_entry_t
233 typedef struct rpl_route_entry {
235 uint32_t saved_lifetime;
237 uint8_t learned_from;
242 #if UIP_CONF_IPV6_RPL
243 #ifndef UIP_CONF_DS6_NEIGHBOR_STATE_CHANGED
244 #define UIP_CONF_DS6_NEIGHBOR_STATE_CHANGED rpl_ipv6_neighbor_callback
257 #ifdef UIP_DS6_ROUTE_STATE_TYPE
265 uint8_t cur_hop_limit;
266 uint32_t base_reachable_time;
267 uint32_t reachable_time;
268 uint32_t retrans_timer;
284 extern struct etimer uip_ds6_timer_periodic;
310 uint8_t isrouter, uint8_t state);
319 unsigned long interval);
330 uint8_t advertise, uint8_t
flags,
332 unsigned long ptime);
335 unsigned long interval);
347 unsigned long vlifetime, uint8_t type);
378 void uip_ds6_route_rm_by_nexthop(
uip_ipaddr_t *nexthop);
400 void uip_ds6_send_ra_sollicited(
void);
403 void uip_ds6_send_ra_periodic(
void);
415 #define uip_ds6_is_my_addr(addr) (uip_ds6_addr_lookup(addr) != NULL)
416 #define uip_ds6_is_my_maddr(addr) (uip_ds6_maddr_lookup(addr) != NULL)
417 #define uip_ds6_is_my_aaddr(addr) (uip_ds6_aaddr_lookup(addr) != NULL)