]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/link_state.h
Merge pull request #12933 from Orange-OpenSource/link_state
[mirror_frr.git] / lib / link_state.h
index e4b97a34ed5fbb9d4fcff162335e28e9112bb08b..d3a0ce39da99abcb87f678db4697ae62a0fce8c1 100644 (file)
@@ -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.