54 #define uip_create_linklocal_rplnodes_mcast(addr) \ 55 uip_ip6addr((addr), 0xff02, 0, 0, 0, 0, 0, 0, 0x001a) 59 #define uip_is_addr_linklocal_rplnodes_mcast(addr) \ 60 ((addr)->u8[0] == 0xff) && \ 61 ((addr)->u8[1] == 0x02) && \ 62 ((addr)->u16[1] == 0) && \ 63 ((addr)->u16[2] == 0) && \ 64 ((addr)->u16[3] == 0) && \ 65 ((addr)->u16[4] == 0) && \ 66 ((addr)->u16[5] == 0) && \ 67 ((addr)->u16[6] == 0) && \ 68 ((addr)->u8[14] == 0) && \ 69 ((addr)->u8[15] == 0x1a)) 72 #define RPL_LIFETIME(lifetime) \ 73 (((lifetime) == RPL_INFINITE_LIFETIME) ? \ 74 RPL_ROUTE_INFINITE_LIFETIME : \ 75 (unsigned long)curr_instance.lifetime_unit * (lifetime)) 78 #define ROOT_RANK curr_instance.min_hoprankinc 81 #define DAG_RANK(fixpt_rank) ((fixpt_rank) / curr_instance.min_hoprankinc) 83 #define RPL_LOLLIPOP_MAX_VALUE 255 84 #define RPL_LOLLIPOP_CIRCULAR_REGION 127 85 #define RPL_LOLLIPOP_SEQUENCE_WINDOWS 16 86 #define RPL_LOLLIPOP_INIT (RPL_LOLLIPOP_MAX_VALUE - RPL_LOLLIPOP_SEQUENCE_WINDOWS + 1) 87 #define RPL_LOLLIPOP_INCREMENT(counter) \ 89 if((counter) > RPL_LOLLIPOP_CIRCULAR_REGION) { \ 90 (counter) = ((counter) + 1) & RPL_LOLLIPOP_MAX_VALUE; \ 92 (counter) = ((counter) + 1) & RPL_LOLLIPOP_CIRCULAR_REGION; \ 96 #define RPL_LOLLIPOP_IS_INIT(counter) \ 97 ((counter) > RPL_LOLLIPOP_CIRCULAR_REGION) 102 typedef uint16_t rpl_rank_t;
103 typedef uint16_t rpl_ocp_t;
119 union metric_object {
137 clock_time_t better_parent_since;
141 rpl_metric_container_t mc;
146 typedef struct rpl_nbr rpl_nbr_t;
164 uint16_t (*nbr_link_metric)(rpl_nbr_t *);
165 int (*nbr_has_usable_link)(rpl_nbr_t *);
166 int (*nbr_is_acceptable_parent)(rpl_nbr_t *);
167 uint16_t (*nbr_path_cost)(rpl_nbr_t *);
168 rpl_rank_t (*rank_via_nbr)(rpl_nbr_t *);
169 rpl_nbr_t *(*best_parent)(rpl_nbr_t *, rpl_nbr_t *);
170 void (*update_metric_container)(void);
173 typedef struct rpl_of rpl_of_t;
187 rpl_prefix_t prefix_info;
188 rpl_nbr_t *preferred_parent;
189 rpl_rank_t lowest_rank;
191 rpl_rank_t last_advertised_rank;
196 uint8_t dio_intcurrent;
199 uint8_t dao_last_seqno;
200 uint8_t dao_last_acked_seqno;
201 uint8_t dao_transmissions;
202 bool unprocessed_parent_switch;
206 clock_time_t dio_next_delay;
207 struct ctimer state_update;
209 struct ctimer dio_timer;
210 struct ctimer unicast_dio_timer;
211 struct ctimer dao_timer;
212 rpl_nbr_t *unicast_dio_target;
214 struct ctimer probing_timer;
215 rpl_nbr_t *urgent_probing_target;
218 uip_ipaddr_t dao_ack_target;
219 uint16_t dao_ack_sequence;
220 struct ctimer dao_ack_timer;
223 typedef struct rpl_dag rpl_dag_t;
228 rpl_metric_container_t mc;
234 uint8_t dio_intdoubl;
236 uint8_t dio_redundancy;
237 rpl_rank_t max_rankinc;
238 rpl_rank_t min_hoprankinc;
239 uint8_t default_lifetime;
240 uint16_t lifetime_unit;
Structure for RPL energy metric.
API for RPL objective functions (OF)
rpl_dag_state
RPL DAG states.
All information related to a RPL neighbor.
Logical representation of a DAG Metric Container.