*
* RTE RIB library.
*
- * @warning
- * @b EXPERIMENTAL:
- * All functions in this file may be changed or removed without prior notice.
- *
* Level compressed tree implementation for IPv4 Longest Prefix Match
*/
#include <stdlib.h>
#include <stdint.h>
-#include <rte_compat.h>
#ifdef __cplusplus
extern "C" {
* pointer to struct rte_rib_node on success
* NULL otherwise
*/
-__rte_experimental
struct rte_rib_node *
rte_rib_lookup(struct rte_rib *rib, uint32_t ip);
* less specific route on success
* NULL otherwise
*/
-__rte_experimental
struct rte_rib_node *
rte_rib_lookup_parent(struct rte_rib_node *ent);
* pointer to struct rte_rib_node on success
* NULL otherwise
*/
-__rte_experimental
struct rte_rib_node *
rte_rib_lookup_exact(struct rte_rib *rib, uint32_t ip, uint8_t depth);
* pointer to the next more specific prefix
* NULL if there is no prefixes left
*/
-__rte_experimental
struct rte_rib_node *
rte_rib_get_nxt(struct rte_rib *rib, uint32_t ip, uint8_t depth,
struct rte_rib_node *last, int flag);
* @param depth
* prefix length
*/
-__rte_experimental
void
rte_rib_remove(struct rte_rib *rib, uint32_t ip, uint8_t depth);
* pointer to new rte_rib_node on success
* NULL otherwise
*/
-__rte_experimental
struct rte_rib_node *
rte_rib_insert(struct rte_rib *rib, uint32_t ip, uint8_t depth);
* 0 on success.
* -1 on failure with rte_errno indicating reason for failure.
*/
-__rte_experimental
int
rte_rib_get_ip(const struct rte_rib_node *node, uint32_t *ip);
* 0 on success.
* -1 on failure with rte_errno indicating reason for failure.
*/
-__rte_experimental
int
rte_rib_get_depth(const struct rte_rib_node *node, uint8_t *depth);
* @return
* pointer to the ext
*/
-__rte_experimental
void *
rte_rib_get_ext(struct rte_rib_node *node);
* 0 on success.
* -1 on failure with rte_errno indicating reason for failure.
*/
-__rte_experimental
int
rte_rib_get_nh(const struct rte_rib_node *node, uint64_t *nh);
* 0 on success.
* -1 on failure with rte_errno indicating reason for failure.
*/
-__rte_experimental
int
rte_rib_set_nh(struct rte_rib_node *node, uint64_t nh);
* Handle to RIB object on success
* NULL otherwise with rte_errno indicating reason for failure.
*/
-__rte_experimental
struct rte_rib *
rte_rib_create(const char *name, int socket_id,
const struct rte_rib_conf *conf);
* Pointer to RIB object on success
* NULL otherwise with rte_errno indicating reason for failure.
*/
-__rte_experimental
struct rte_rib *
rte_rib_find_existing(const char *name);
* @return
* None
*/
-__rte_experimental
void
rte_rib_free(struct rte_rib *rib);