X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_rib%2Frte_rib6.h;h=dbd52928a243eae49f2e26ec7cec8781e256f4bc;hb=039b769f7c018351fbadf240f7dd692d3b02518f;hp=4b284c913c70bb9845b7385530aec6a08e1f8eed;hpb=74f4d6424da1297bd6e83dcb7bd84444ca8c59dd;p=dpdk.git diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h index 4b284c913c..dbd52928a2 100644 --- a/lib/librte_rib/rte_rib6.h +++ b/lib/librte_rib/rte_rib6.h @@ -20,6 +20,11 @@ #include #include +#include + +#ifdef __cplusplus +extern "C" { +#endif #define RTE_RIB6_IPV6_ADDR_SIZE 16 @@ -77,7 +82,7 @@ rte_rib6_copy_addr(uint8_t *dst, const uint8_t *src) * 0 otherwise */ static inline int -rte_rib6_is_equal(uint8_t *ip1, uint8_t *ip2) { +rte_rib6_is_equal(const uint8_t *ip1, const uint8_t *ip2) { int i; if ((ip1 == NULL) || (ip2 == NULL)) @@ -234,8 +239,8 @@ rte_rib6_insert(struct rte_rib6 *rib, */ __rte_experimental int -rte_rib6_get_ip(struct rte_rib6_node *node, - uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE]); +rte_rib6_get_ip(const struct rte_rib6_node *node, + uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE]); /** * Get a depth from rte_rib6_node @@ -250,7 +255,7 @@ rte_rib6_get_ip(struct rte_rib6_node *node, */ __rte_experimental int -rte_rib6_get_depth(struct rte_rib6_node *node, uint8_t *depth); +rte_rib6_get_depth(const struct rte_rib6_node *node, uint8_t *depth); /** * Get ext field from the rte_rib6_node @@ -279,7 +284,7 @@ rte_rib6_get_ext(struct rte_rib6_node *node); */ __rte_experimental int -rte_rib6_get_nh(struct rte_rib6_node *node, uint64_t *nh); +rte_rib6_get_nh(const struct rte_rib6_node *node, uint64_t *nh); /** * Set nexthop into the rte_rib6_node @@ -311,7 +316,8 @@ rte_rib6_set_nh(struct rte_rib6_node *node, uint64_t nh); */ __rte_experimental struct rte_rib6 * -rte_rib6_create(const char *name, int socket_id, struct rte_rib6_conf *conf); +rte_rib6_create(const char *name, int socket_id, + const struct rte_rib6_conf *conf); /** * Find an existing RIB object and return a pointer to it. @@ -338,4 +344,8 @@ __rte_experimental void rte_rib6_free(struct rte_rib6 *rib); -#endif /* _RTE_RIB_H_ */ +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_RIB6_H_ */