43 #ifndef UIP_DS6_ROUTE_H
44 #define UIP_DS6_ROUTE_H
52 #ifndef UIP_CONF_UIP_DS6_NOTIFICATIONS
53 #define UIP_DS6_NOTIFICATIONS 1
55 #define UIP_DS6_NOTIFICATIONS UIP_CONF_UIP_DS6_NOTIFICATIONS
58 #if UIP_DS6_NOTIFICATIONS
63 #define UIP_DS6_NOTIFICATION_DEFRT_ADD 0
64 #define UIP_DS6_NOTIFICATION_DEFRT_RM 1
65 #define UIP_DS6_NOTIFICATION_ROUTE_ADD 2
66 #define UIP_DS6_NOTIFICATION_ROUTE_RM 3
68 typedef void (* uip_ds6_notification_callback)(
int event,
70 uip_ipaddr_t *nexthop,
72 struct uip_ds6_notification {
73 struct uip_ds6_notification *next;
74 uip_ds6_notification_callback callback;
77 void uip_ds6_notification_add(
struct uip_ds6_notification *n,
78 uip_ds6_notification_callback c);
80 void uip_ds6_notification_rm(
struct uip_ds6_notification *n);
85 #ifndef UIP_CONF_MAX_ROUTES
86 #ifdef UIP_CONF_DS6_ROUTE_NBU
87 #define UIP_DS6_ROUTE_NB UIP_CONF_DS6_ROUTE_NBU
89 #define UIP_DS6_ROUTE_NB 4
92 #define UIP_DS6_ROUTE_NB UIP_CONF_MAX_ROUTES
97 #ifndef UIP_DS6_ROUTE_STATE_TYPE
98 #define UIP_DS6_ROUTE_STATE_TYPE rpl_route_entry_t
100 typedef struct rpl_route_entry {
103 uint8_t learned_from;
104 uint8_t nopath_received;
111 LIST_STRUCT(route_list);
124 #ifdef UIP_DS6_ROUTE_STATE_TYPE
149 unsigned long interval);
167 uip_ipaddr_t *next_hop);
171 void uip_ds6_route_rm_by_nexthop(uip_ipaddr_t *nexthop);