net/bnxt: modify port DB to handle more info
[dpdk.git] / lib / librte_rib / rte_rib.h
index da558c4..f80752e 100644 (file)
 
 #include <rte_compat.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * rte_rib_get_nxt() flags
  */
@@ -178,7 +182,7 @@ rte_rib_insert(struct rte_rib *rib, uint32_t ip, uint8_t depth);
  */
 __rte_experimental
 int
-rte_rib_get_ip(struct rte_rib_node *node, uint32_t *ip);
+rte_rib_get_ip(const struct rte_rib_node *node, uint32_t *ip);
 
 /**
  * Get a depth from rte_rib_node
@@ -193,7 +197,7 @@ rte_rib_get_ip(struct rte_rib_node *node, uint32_t *ip);
  */
 __rte_experimental
 int
-rte_rib_get_depth(struct rte_rib_node *node, uint8_t *depth);
+rte_rib_get_depth(const struct rte_rib_node *node, uint8_t *depth);
 
 /**
  * Get ext field from the rib node
@@ -222,7 +226,7 @@ rte_rib_get_ext(struct rte_rib_node *node);
  */
 __rte_experimental
 int
-rte_rib_get_nh(struct rte_rib_node *node, uint64_t *nh);
+rte_rib_get_nh(const struct rte_rib_node *node, uint64_t *nh);
 
 /**
  * Set nexthop into the rib node
@@ -254,7 +258,8 @@ rte_rib_set_nh(struct rte_rib_node *node, uint64_t nh);
  */
 __rte_experimental
 struct rte_rib *
-rte_rib_create(const char *name, int socket_id, struct rte_rib_conf *conf);
+rte_rib_create(const char *name, int socket_id,
+              const struct rte_rib_conf *conf);
 
 /**
  * Find an existing RIB object and return a pointer to it.
@@ -281,4 +286,8 @@ __rte_experimental
 void
 rte_rib_free(struct rte_rib *rib);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_RIB_H_ */