1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2023 Marvell. 3 */ 4 5 #ifndef APP_GRAPH_ROUTE_H 6 #define APP_GRAPH_ROUTE_H 7 8 #include <rte_ip6.h> 9 10 #define MAX_ROUTE_ENTRIES 32 11 12 struct route_ipv4_config { 13 TAILQ_ENTRY(route_ipv4_config) next; 14 uint32_t ip; 15 uint32_t netmask; 16 uint32_t via; 17 bool is_used; 18 }; 19 20 TAILQ_HEAD(ip4_route, route_ipv4_config); 21 22 struct route_ipv6_config { 23 TAILQ_ENTRY(route_ipv6_config) next; 24 struct rte_ipv6_addr ip; 25 struct rte_ipv6_addr mask; 26 struct rte_ipv6_addr gateway; 27 bool is_used; 28 }; 29 30 TAILQ_HEAD(ip6_route, route_ipv6_config); 31 32 int route_ip4_add_to_lookup(void); 33 int route_ip6_add_to_lookup(void); 34 void route_ip4_list_clean(void); 35 void route_ip6_list_clean(void); 36 37 #endif 38