Moved RPL Lifetime configuration to rpl-conf.h
This commit is contained in:
parent
b6c54faf9d
commit
e02d480ff5
2 changed files with 19 additions and 14 deletions
|
@ -165,4 +165,23 @@
|
||||||
#define RPL_INIT_LINK_METRIC NEIGHBOR_INFO_ETX2FIX(RPL_CONF_INIT_LINK_METRIC)
|
#define RPL_INIT_LINK_METRIC NEIGHBOR_INFO_ETX2FIX(RPL_CONF_INIT_LINK_METRIC)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Default route lifetime unit. This is the granularity of time
|
||||||
|
* used in RPL lifetime values, in seconds.
|
||||||
|
*/
|
||||||
|
#ifndef RPL_CONF_DEFAULT_LIFETIME_UNIT
|
||||||
|
#define RPL_DEFAULT_LIFETIME_UNIT 0xffff
|
||||||
|
#else
|
||||||
|
#define RPL_DEFAULT_LIFETIME_UNIT RPL_CONF_DEFAULT_LIFETIME_UNIT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Default route lifetime as a multiple of the lifetime unit.
|
||||||
|
*/
|
||||||
|
#ifndef RPL_CONF_DEFAULT_LIFETIME
|
||||||
|
#define RPL_DEFAULT_LIFETIME 0xff
|
||||||
|
#else
|
||||||
|
#define RPL_DEFAULT_LIFETIME RPL_CONF_DEFAULT_LIFETIME
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* RPL_CONF_H */
|
#endif /* RPL_CONF_H */
|
||||||
|
|
|
@ -112,20 +112,6 @@
|
||||||
/* Special value indicating immediate removal. */
|
/* Special value indicating immediate removal. */
|
||||||
#define RPL_ZERO_LIFETIME 0
|
#define RPL_ZERO_LIFETIME 0
|
||||||
|
|
||||||
/* Default route lifetime unit. */
|
|
||||||
#ifndef RPL_CONF_DEFAULT_LIFETIME_UNIT
|
|
||||||
#define RPL_DEFAULT_LIFETIME_UNIT 0xffff
|
|
||||||
#else
|
|
||||||
#define RPL_DEFAULT_LIFETIME_UNIT RPL_CONF_DEFAULT_LIFETIME_UNIT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Default route lifetime as a multiple of the lifetime unit. */
|
|
||||||
#ifndef RPL_CONF_DEFAULT_LIFETIME
|
|
||||||
#define RPL_DEFAULT_LIFETIME 0xff
|
|
||||||
#else
|
|
||||||
#define RPL_DEFAULT_LIFETIME RPL_CONF_DEFAULT_LIFETIME
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RPL_LIFETIME(instance, lifetime) \
|
#define RPL_LIFETIME(instance, lifetime) \
|
||||||
((unsigned long)(instance)->lifetime_unit * (lifetime))
|
((unsigned long)(instance)->lifetime_unit * (lifetime))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue