5 #ifndef __CNET_ROUTE4_H
6 #define __CNET_ROUTE4_H
13 #include <net/ethernet.h>
15 #include <sys/queue.h>
28 #define RT4_NEXT_INDEX_SHIFT 24UL
32 struct in_addr nexthop;
33 struct in_addr netmask;
34 struct in_addr gateway;
35 struct in_addr subnet;
40 } __cne_cache_aligned;
143 struct in_addr *gate, uint8_t metric, uint16_t timo);
CNDP_API int cnet_route4_insert(int netif_idx, struct in_addr *dst, struct in_addr *netmask, struct in_addr *gate, uint8_t metric, uint16_t timo)
Insert IPv4 route into the routing table.
CNDP_API void cnet_route4_free(struct rt4_entry *entry)
Free a IPv4 route entry.
CNDP_API struct rt4_entry * cnet_route4_get(uint64_t nh)
Return a single route entry given the nexthop index value.
CNDP_API int cnet_route4_delete(struct in_addr *ipaddr)
Delete a IPv4 route entry.
CNDP_API struct rt4_entry * cnet_route4_alloc(void)
Allocate a IPv4 route entry.
CNDP_API int cne_route4_notify(void)
Routine to call when a route notification is received.
CNDP_API int cnet_route4_get_bulk(uint64_t *nh, struct rt4_entry **rt, int n)
Get a bulk of route entries using the nexthop index values.
CNDP_API int cnet_route4_alloc_bulk(struct rt4_entry **rt, int n)
Allocate a number of IPv4 route entries.
CNDP_API int cnet_route4_create(struct cnet *cnet, uint32_t num_rules, uint32_t num_tbl8s)
Create a IPv4 route instance.
CNDP_API int cnet_route4_show(void)
Display the IPvr route entries.
CNDP_API int cnet_route4_destroy(struct cnet *cnet)
Destroy the IPv4 routing instance.
CNDP_API void cne_route4_timer(void)
Enable a IPv4 route entry timer to age entries.
CNDP_API void cnet_route4_free_bulk(struct rt4_entry **entry, int n)
Free a bulk of IPv4 route entries.