/**
* @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 <rte_memcpy.h>
#include <rte_compat.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define RTE_RIB6_IPV6_ADDR_SIZE 16
/**
* 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))
*/
__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
*/
__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
*/
__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
*/
__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.
void
rte_rib6_free(struct rte_rib6 *rib);
-#endif /* _RTE_RIB_H_ */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_RIB6_H_ */