X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_rib%2Frte_rib6.h;h=b5e10569b926fd4f97c3955e204e2f4812a9cf45;hb=6857fdaff5ee93de0b12f407f5dceb2f433b5aa2;hp=871457138d7b8dc9a959101f06a5bfa86e37ed52;hpb=f7e861e21c469b54123f7601eab9155291b93c9b;p=dpdk.git diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h index 871457138d..b5e10569b9 100644 --- a/lib/librte_rib/rte_rib6.h +++ b/lib/librte_rib/rte_rib6.h @@ -8,12 +8,23 @@ /** * @file + * + * RTE rib6 library. + * + * @warning + * @b EXPERIMENTAL: + * All functions in this file may be changed or removed without prior notice. + * * Level compressed tree implementation for IPv6 Longest Prefix Match */ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define RTE_RIB6_IPV6_ADDR_SIZE 16 /** @@ -70,7 +81,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)) @@ -227,8 +238,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 @@ -243,7 +254,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 @@ -272,7 +283,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 @@ -304,7 +315,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. @@ -331,4 +343,8 @@ __rte_experimental void rte_rib6_free(struct rte_rib6 *rib); -#endif /* _RTE_RIB_H_ */ +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_RIB6_H_ */