diff options
Diffstat (limited to 'lib/link_state.h')
| -rw-r--r-- | lib/link_state.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/link_state.h b/lib/link_state.h index e4b97a34ed..d3a0ce39da 100644 --- a/lib/link_state.h +++ b/lib/link_state.h @@ -92,6 +92,9 @@ struct ls_node_id { */ extern int ls_node_id_same(struct ls_node_id i1, struct ls_node_id i2); +/* Supported number of algorithm by the link-state library */ +#define LIB_LS_SR_ALGO_COUNT 2 + /* Link State flags to indicate which Node parameters are valid */ #define LS_NODE_UNSET 0x0000 #define LS_NODE_NAME 0x0001 @@ -123,7 +126,7 @@ struct ls_node { uint32_t lower_bound; /* MPLS label lower bound */ uint32_t range_size; /* MPLS label range size */ } srlb; - uint8_t algo[2]; /* Segment Routing Algorithms */ + uint8_t algo[LIB_LS_SR_ALGO_COUNT]; /* Segment Routing Algorithms */ uint8_t msd; /* Maximum Stack Depth */ }; @@ -314,7 +317,7 @@ extern int ls_attributes_same(struct ls_attributes *a1, * * @return New Link State Prefix */ -extern struct ls_prefix *ls_prefix_new(struct ls_node_id adv, struct prefix p); +extern struct ls_prefix *ls_prefix_new(struct ls_node_id adv, struct prefix *p); /** * Remove Link State Prefix. Data Structure is freed. @@ -731,7 +734,7 @@ extern void ls_subnet_del_all(struct ls_ted *ted, struct ls_subnet *subnet); * @return Subnet if found, NULL otherwise */ extern struct ls_subnet *ls_find_subnet(struct ls_ted *ted, - const struct prefix prefix); + const struct prefix *prefix); /** * Create a new Link State Data Base. |
