Removed the force flag from rpl_reset_dio_timer. Removed an unnecessary DIO timer reset when changing rank but keeping the same preferred parent.
This commit is contained in:
parent
3f31fb9514
commit
f112fa99d5
4 changed files with 66 additions and 63 deletions
|
@ -53,21 +53,24 @@
|
|||
#include "net/uip-ds6.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** \brief Is IPv6 address a the link local all rpl nodes multicast address */
|
||||
#define uip_is_addr_linklocal_rplnodes_mcast(a) \
|
||||
((((a)->u8[0]) == 0xff) && \
|
||||
(((a)->u8[1]) == 0x02) && \
|
||||
(((a)->u16[1]) == 0) && \
|
||||
(((a)->u16[2]) == 0) && \
|
||||
(((a)->u16[3]) == 0) && \
|
||||
(((a)->u16[4]) == 0) && \
|
||||
(((a)->u16[5]) == 0) && \
|
||||
(((a)->u16[6]) == 0) && \
|
||||
(((a)->u8[14]) == 0) && \
|
||||
(((a)->u8[15]) == 0x1a))
|
||||
/** \brief Is IPv6 address addr the link-local, all-RPL-nodes
|
||||
multicast address? */
|
||||
#define uip_is_addr_linklocal_rplnodes_mcast(a) \
|
||||
((addr)->u8[0] == 0xff) && \
|
||||
((addr)->u8[1] == 0x02) && \
|
||||
((addr)->u16[1] == 0) && \
|
||||
((addr)->u16[2] == 0) && \
|
||||
((addr)->u16[3] == 0) && \
|
||||
((addr)->u16[4] == 0) && \
|
||||
((addr)->u16[5] == 0) && \
|
||||
((addr)->u16[6] == 0) && \
|
||||
((addr)->u8[14] == 0) && \
|
||||
((addr)->u8[15] == 0x1a))
|
||||
|
||||
/** \brief set IP address a to the link local all-rpl nodes multicast address */
|
||||
#define uip_create_linklocal_rplnodes_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x001a)
|
||||
/** \brief Set IP address addr to the link-local, all-rpl-nodes
|
||||
multicast address. */
|
||||
#define uip_create_linklocal_rplnodes_mcast(addr) \
|
||||
uip_ip6addr((addr), 0xff02, 0, 0, 0, 0, 0, 0, 0x001a)
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* RPL message types */
|
||||
#define RPL_CODE_DIS 0x00 /* DAG Information Solicitation */
|
||||
|
@ -80,16 +83,16 @@
|
|||
#define RPL_CODE_SEC_DAO_ACK 0x83 /* Secure DAO ACK */
|
||||
|
||||
/* RPL control message options. */
|
||||
#define RPL_OPTION_PAD1 0
|
||||
#define RPL_OPTION_PADN 1
|
||||
#define RPL_OPTION_DAG_METRIC_CONTAINER 2
|
||||
#define RPL_OPTION_ROUTE_INFO 3
|
||||
#define RPL_OPTION_DAG_CONF 4
|
||||
#define RPL_OPTION_TARGET 5
|
||||
#define RPL_OPTION_TRANSIT 6
|
||||
#define RPL_OPTION_SOLICITED_INFO 7
|
||||
#define RPL_OPTION_PREFIX_INFO 8
|
||||
#define RPL_OPTION_TARGET_DESC 9
|
||||
#define RPL_OPTION_PAD1 0
|
||||
#define RPL_OPTION_PADN 1
|
||||
#define RPL_OPTION_DAG_METRIC_CONTAINER 2
|
||||
#define RPL_OPTION_ROUTE_INFO 3
|
||||
#define RPL_OPTION_DAG_CONF 4
|
||||
#define RPL_OPTION_TARGET 5
|
||||
#define RPL_OPTION_TRANSIT 6
|
||||
#define RPL_OPTION_SOLICITED_INFO 7
|
||||
#define RPL_OPTION_PREFIX_INFO 8
|
||||
#define RPL_OPTION_TARGET_DESC 9
|
||||
|
||||
#define RPL_DAO_K_FLAG 0x80 /* DAO ACK requested */
|
||||
#define RPL_DAO_D_FLAG 0x40 /* DODAG ID present */
|
||||
|
@ -116,15 +119,15 @@
|
|||
#define RPL_DEFAULT_LIFETIME_UNIT 0xffff
|
||||
|
||||
/* Default route lifetime as a multiple of the lifetime unit. */
|
||||
#define RPL_DEFAULT_LIFETIME 0xff
|
||||
#define RPL_DEFAULT_LIFETIME 0xff
|
||||
|
||||
#define RPL_LIFETIME(instance, lifetime) \
|
||||
(((unsigned long)(instance)->lifetime_unit) * lifetime)
|
||||
((unsigned long)(instance)->lifetime_unit * (lifetime))
|
||||
|
||||
#ifndef RPL_CONF_MIN_HOPRANKINC
|
||||
#define DEFAULT_MIN_HOPRANKINC 256
|
||||
#else
|
||||
#define DEFAULT_MIN_HOPRANKINC RPL_CONF_MIN_HOPRANKINC
|
||||
#define DEFAULT_MIN_HOPRANKINC RPL_CONF_MIN_HOPRANKINC
|
||||
#endif
|
||||
#define DEFAULT_MAX_RANKINC (3 * DEFAULT_MIN_HOPRANKINC)
|
||||
|
||||
|
@ -134,7 +137,7 @@
|
|||
#define BASE_RANK 0
|
||||
|
||||
/* Rank of a root node. */
|
||||
#define ROOT_RANK(instance) (instance)->min_hoprankinc
|
||||
#define ROOT_RANK(instance) (instance)->min_hoprankinc
|
||||
|
||||
#define INFINITE_RANK 0xffff
|
||||
|
||||
|
@ -277,8 +280,7 @@ void rpl_free_instance(rpl_instance_t *);
|
|||
/* DAG parent management function. */
|
||||
rpl_parent_t *rpl_add_parent(rpl_dag_t *, rpl_dio_t *dio, uip_ipaddr_t *);
|
||||
rpl_parent_t *rpl_find_parent(rpl_dag_t *, uip_ipaddr_t *);
|
||||
rpl_parent_t * rpl_find_parent_any_dag(rpl_instance_t *instance, uip_ipaddr_t *addr);
|
||||
rpl_dag_t * rpl_find_parent_dag(rpl_instance_t *instance, uip_ipaddr_t *addr);
|
||||
rpl_parent_t *rpl_find_parent_any_dag(rpl_instance_t *instance, uip_ipaddr_t *addr);
|
||||
void rpl_nullify_parent(rpl_dag_t *, rpl_parent_t *);
|
||||
void rpl_remove_parent(rpl_dag_t *, rpl_parent_t *);
|
||||
void rpl_move_parent(rpl_dag_t *dag_src, rpl_dag_t *dag_dst, rpl_parent_t *parent);
|
||||
|
@ -298,7 +300,7 @@ rpl_of_t *rpl_find_of(rpl_ocp_t);
|
|||
|
||||
/* Timer functions. */
|
||||
void rpl_schedule_dao(rpl_instance_t *);
|
||||
void rpl_reset_dio_timer(rpl_instance_t *, uint8_t);
|
||||
void rpl_reset_dio_timer(rpl_instance_t *);
|
||||
void rpl_reset_periodic_timer(void);
|
||||
|
||||
/* Route poisoning. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue