2013-02-13 15:00:43 +01:00
|
|
|
#include "rpl_structs.h"
|
|
|
|
|
|
|
|
// Disallow links with greater than 4 expected
|
|
|
|
// transmission counts on the selected path.
|
|
|
|
#define MAX_LINK_METRIC (512)
|
|
|
|
|
|
|
|
// Disallow paths with greater than 256
|
|
|
|
// expected transmission counts.
|
2013-02-21 18:25:35 +01:00
|
|
|
#define MAX_PATH_COST (0x8000)
|
2013-02-13 15:00:43 +01:00
|
|
|
|
|
|
|
// Switch to a new path only if it is
|
|
|
|
// expected to require at least 1.5 fewer transmissions than the
|
|
|
|
// current path.
|
|
|
|
#define PARENT_SWITCH_THRESHOLD (192)
|
|
|
|
|
2013-02-21 18:25:35 +01:00
|
|
|
// If the preferred parent is not available, some more
|
2013-02-13 15:00:43 +01:00
|
|
|
// candidate parents are still available without triggering a new
|
|
|
|
// round of route discovery.
|
2013-02-21 18:25:35 +01:00
|
|
|
#define PARENT_SET_SIZE (RPL_MAX_PARENTS)
|
2013-02-13 15:00:43 +01:00
|
|
|
|
|
|
|
// Do not allow a node to become a floating root.
|
|
|
|
#define ALLOW_FLOATING_ROOT (0)
|
|
|
|
|
2013-02-21 18:25:35 +01:00
|
|
|
// While assigning Rank when using ETX, use the representation of ETX described
|
|
|
|
// in [RFC6551], i.e., assign Rank equal to ETX * 128.
|
|
|
|
#define ETX_RANK_MULTIPLIER (0x80)
|
|
|
|
|
2013-02-13 15:00:43 +01:00
|
|
|
rpl_of_t *rpl_get_of_mrhof();
|
2013-02-21 18:25:35 +01:00
|
|
|
uint16_t calc_rank();
|
|
|
|
uint16_t calc_path_cost();
|
|
|
|
uint16_t calc_etx_value();
|
2013-02-13 15:00:43 +01:00
|
|
|
rpl_parent_t *which_parent(rpl_parent_t *, rpl_parent_t *);
|
|
|
|
rpl_dodag_t *which_dodag(rpl_dodag_t *, rpl_dodag_t *);
|
|
|
|
void reset(rpl_dodag_t *);
|
2013-02-21 18:25:35 +01:00
|
|
|
|
|
|
|
//############################
|
|
|
|
// OF specific structs #######
|
|
|
|
//############################
|
|
|
|
|
|
|
|
//neighbour struct for etx path calculation
|
|
|
|
typedef struct mrhof_candidate_info_t {
|
|
|
|
ipv6_addr_t addr;
|
|
|
|
uint16_t packet_snt;
|
|
|
|
uint16_t packet_rec;
|
|
|
|
uint16_t cur_path_cost;
|
|
|
|
uint16_t cur_etx;
|
|
|
|
} mrhof_candidate_info_t;
|