git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice/base: clean code in flow director module
[dpdk.git]
/
lib
/
librte_rib
/
rte_rib6.h
diff --git
a/lib/librte_rib/rte_rib6.h
b/lib/librte_rib/rte_rib6.h
index
8714571
..
b5e1056
100644
(file)
--- a/
lib/librte_rib/rte_rib6.h
+++ b/
lib/librte_rib/rte_rib6.h
@@
-8,12
+8,23
@@
/**
* @file
/**
* @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>
* 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
/**
#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
* 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))
int i;
if ((ip1 == NULL) || (ip2 == NULL))
@@
-227,8
+238,8
@@
rte_rib6_insert(struct rte_rib6 *rib,
*/
__rte_experimental
int
*/
__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
/**
* Get a depth from rte_rib6_node
@@
-243,7
+254,7
@@
rte_rib6_get_ip(struct rte_rib6_node *node,
*/
__rte_experimental
int
*/
__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
/**
* 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_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
/**
* 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_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.
/**
* 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);
void
rte_rib6_free(struct rte_rib6 *rib);
-#endif /* _RTE_RIB_H_ */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_RIB6_H_ */