25 #define CNE_RIB6_IPV6_ADDR_SIZE 16
62 if ((dst == NULL) || (src == NULL))
64 memcpy(dst, src, CNE_RIB6_IPV6_ADDR_SIZE);
84 if ((ip1 == NULL) || (ip2 == NULL))
86 for (i = 0; i < CNE_RIB6_IPV6_ADDR_SIZE; i++) {
104 static inline uint8_t
111 part =
CNE_MAX((int16_t)depth - (
byte * 8), 0);
112 part = (part > 8) ? 8 : part;
113 return (uint16_t)(~UINT8_MAX) >> part;
128 const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE]);
156 const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE],
183 const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE],
184 uint8_t depth,
struct cne_rib6_node *last,
197 CNDP_API
void cne_rib6_remove(
struct cne_rib6 *rib,
const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE],
213 CNDP_API
struct cne_rib6_node *
214 cne_rib6_insert(
struct cne_rib6 *rib,
const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE], uint8_t depth);
227 CNDP_API
int cne_rib6_get_ip(
const struct cne_rib6_node *node, uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE]);
CNDP_API struct cne_rib6_node * cne_rib6_insert(struct cne_rib6 *rib, const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE], uint8_t depth)
static uint8_t get_msk_part(uint8_t depth, int byte)
CNDP_API int cne_rib6_get_depth(const struct cne_rib6_node *node, uint8_t *depth)
static void cne_rib6_copy_addr(uint8_t *dst, const uint8_t *src)
CNDP_API void cne_rib6_free(struct cne_rib6 *rib)
CNDP_API struct cne_rib6_node * cne_rib6_lookup_exact(struct cne_rib6 *rib, const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE], uint8_t depth)
static int cne_rib6_is_equal(const uint8_t *ip1, const uint8_t *ip2)
CNDP_API struct cne_rib6_node * cne_rib6_lookup_parent(struct cne_rib6_node *ent)
CNDP_API int cne_rib6_set_nh(struct cne_rib6_node *node, uint64_t nh)
CNDP_API int cne_rib6_get_nh(const struct cne_rib6_node *node, uint64_t *nh)
CNDP_API void cne_rib6_remove(struct cne_rib6 *rib, const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE], uint8_t depth)
CNDP_API void * cne_rib6_get_ext(struct cne_rib6_node *node)
CNDP_API struct cne_rib6 * cne_rib6_create(const char *name, const struct cne_rib6_conf *conf)
CNDP_API struct cne_rib6_node * cne_rib6_get_nxt(struct cne_rib6 *rib, const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE], uint8_t depth, struct cne_rib6_node *last, int flag)
CNDP_API int cne_rib6_get_ip(const struct cne_rib6_node *node, uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE])
CNDP_API struct cne_rib6_node * cne_rib6_lookup(struct cne_rib6 *rib, const uint8_t ip[CNE_RIB6_IPV6_ADDR_SIZE])