aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_fib.h
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2020-11-29 13:41:49 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2020-11-29 13:41:49 +0000
commitb712e3e343c1437d28c90e9da28e7339426ba8e2 (patch)
tree81967c102ead0311215d8b4ea9e00df01d314205 /sys/netinet6/in6_fib.h
parent98d5c4e5c85bec2e966714347951c2ea0fb90d12 (diff)
downloadsrc-b712e3e343c1437d28c90e9da28e7339426ba8e2.tar.gz
src-b712e3e343c1437d28c90e9da28e7339426ba8e2.zip
Refactor fib4/fib6 functions.
No functional changes. * Make lookup path of fib<4|6>_lookup_debugnet() separate functions (fib<46>_lookup_rt()). These will be used in the control plane code requiring unlocked radix operations and actual prefix pointer. * Make lookup part of fib<4|6>_check_urpf() separate functions. This change simplifies the switch to alternative lookup implementations, which helps algorithmic lookups introduction. * While here, use static initializers for IPv4/IPv6 keys Differential Revision: https://reviews.freebsd.org/D27405
Notes
Notes: svn path=/head/; revision=368147
Diffstat (limited to 'sys/netinet6/in6_fib.h')
-rw-r--r--sys/netinet6/in6_fib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet6/in6_fib.h b/sys/netinet6/in6_fib.h
index 78edb5e5b776..2b260811ca36 100644
--- a/sys/netinet6/in6_fib.h
+++ b/sys/netinet6/in6_fib.h
@@ -32,11 +32,16 @@
#ifndef _NETINET6_IN6_FIB_H_
#define _NETINET6_IN6_FIB_H_
+struct rtentry;
+struct route_nhop_data;
+
struct nhop_object *fib6_lookup(uint32_t fibnum,
const struct in6_addr *dst6, uint32_t scopeid, uint32_t flags,
uint32_t flowid);
int fib6_check_urpf(uint32_t fibnum, const struct in6_addr *dst6,
uint32_t scopeid, uint32_t flags, const struct ifnet *src_if);
+struct rtentry *fib6_lookup_rt(uint32_t fibnum, const struct in6_addr *dst6,
+ uint32_t scopeid, uint32_t flags, struct route_nhop_data *rnd);
struct nhop_object *fib6_lookup_debugnet(uint32_t fibnum,
const struct in6_addr *dst6, uint32_t scopeid, uint32_t flags);
uint32_t fib6_calc_software_hash(const struct in6_addr *src,