165ff3638SAlexander V. Chernikov /*- 265ff3638SAlexander V. Chernikov * Copyright (c) 2015 365ff3638SAlexander V. Chernikov * Alexander V. Chernikov <melifaro@FreeBSD.org> 465ff3638SAlexander V. Chernikov * 565ff3638SAlexander V. Chernikov * Redistribution and use in source and binary forms, with or without 665ff3638SAlexander V. Chernikov * modification, are permitted provided that the following conditions 765ff3638SAlexander V. Chernikov * are met: 865ff3638SAlexander V. Chernikov * 1. Redistributions of source code must retain the above copyright 965ff3638SAlexander V. Chernikov * notice, this list of conditions and the following disclaimer. 1065ff3638SAlexander V. Chernikov * 2. Redistributions in binary form must reproduce the above copyright 1165ff3638SAlexander V. Chernikov * notice, this list of conditions and the following disclaimer in the 1265ff3638SAlexander V. Chernikov * documentation and/or other materials provided with the distribution. 13fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 1465ff3638SAlexander V. Chernikov * may be used to endorse or promote products derived from this software 1565ff3638SAlexander V. Chernikov * without specific prior written permission. 1665ff3638SAlexander V. Chernikov * 1765ff3638SAlexander V. Chernikov * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1865ff3638SAlexander V. Chernikov * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1965ff3638SAlexander V. Chernikov * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2065ff3638SAlexander V. Chernikov * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2165ff3638SAlexander V. Chernikov * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2265ff3638SAlexander V. Chernikov * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2365ff3638SAlexander V. Chernikov * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2465ff3638SAlexander V. Chernikov * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2565ff3638SAlexander V. Chernikov * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2665ff3638SAlexander V. Chernikov * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2765ff3638SAlexander V. Chernikov * SUCH DAMAGE. 2865ff3638SAlexander V. Chernikov */ 2965ff3638SAlexander V. Chernikov 3065ff3638SAlexander V. Chernikov #ifndef _NETINET6_IN6_FIB_H_ 3165ff3638SAlexander V. Chernikov #define _NETINET6_IN6_FIB_H_ 3265ff3638SAlexander V. Chernikov 33b712e3e3SAlexander V. Chernikov struct rtentry; 34b712e3e3SAlexander V. Chernikov struct route_nhop_data; 35b712e3e3SAlexander V. Chernikov 36a6663252SAlexander V. Chernikov struct nhop_object *fib6_lookup(uint32_t fibnum, 37a6663252SAlexander V. Chernikov const struct in6_addr *dst6, uint32_t scopeid, uint32_t flags, 38a6663252SAlexander V. Chernikov uint32_t flowid); 39a6663252SAlexander V. Chernikov int fib6_check_urpf(uint32_t fibnum, const struct in6_addr *dst6, 40a6663252SAlexander V. Chernikov uint32_t scopeid, uint32_t flags, const struct ifnet *src_if); 41b712e3e3SAlexander V. Chernikov struct rtentry *fib6_lookup_rt(uint32_t fibnum, const struct in6_addr *dst6, 42b712e3e3SAlexander V. Chernikov uint32_t scopeid, uint32_t flags, struct route_nhop_data *rnd); 4355f57ca9SAlexander V. Chernikov struct nhop_object *fib6_lookup_debugnet(uint32_t fibnum, 4455f57ca9SAlexander V. Chernikov const struct in6_addr *dst6, uint32_t scopeid, uint32_t flags); 45*f5baf8bbSAlexander V. Chernikov struct nhop_object *fib6_radix_lookup_nh(uint32_t fibnum, 46*f5baf8bbSAlexander V. Chernikov const struct in6_addr *dst6, uint32_t scopeid); 470c325f53SAlexander V. Chernikov uint32_t fib6_calc_software_hash(const struct in6_addr *src, 480c325f53SAlexander V. Chernikov const struct in6_addr *dst, unsigned short src_port, unsigned short dst_port, 490c325f53SAlexander V. Chernikov char proto, uint32_t *phashtype); 5065ff3638SAlexander V. Chernikov #endif 51