diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-11-29 13:41:49 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-11-29 13:41:49 +0000 |
commit | b712e3e343c1437d28c90e9da28e7339426ba8e2 (patch) | |
tree | 81967c102ead0311215d8b4ea9e00df01d314205 /sys/netinet/in_fib.h | |
parent | 98d5c4e5c85bec2e966714347951c2ea0fb90d12 (diff) | |
download | src-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/netinet/in_fib.h')
-rw-r--r-- | sys/netinet/in_fib.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/in_fib.h b/sys/netinet/in_fib.h index 0d93086bc116..7b31e09e82fc 100644 --- a/sys/netinet/in_fib.h +++ b/sys/netinet/in_fib.h @@ -45,10 +45,15 @@ struct route_in { struct sockaddr_in ro_dst4; }; +struct rtentry; +struct route_nhop_data; + struct nhop_object *fib4_lookup(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, uint32_t flags, uint32_t flowid); int fib4_check_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, uint32_t flags, const struct ifnet *src_if); +struct rtentry *fib4_lookup_rt(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, + uint32_t flags, struct route_nhop_data *nrd); struct nhop_object *fib4_lookup_debugnet(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, uint32_t flags); uint32_t fib4_calc_software_hash(struct in_addr src, struct in_addr dst, |