/freebsd/sys/net/ |
H A D | route.c | 100 rt_table_init(int offset, int family, u_int fibnum) in rt_table_init() argument 114 rh->rib_fibnum = fibnum; in rt_table_init() 190 rib_add_redirect(u_int fibnum, struct sockaddr *dst, struct sockaddr *gateway, in rib_add_redirect() argument 200 if (rt_tables_get_rnh(fibnum, dst->sa_family) == NULL) in rib_add_redirect() 212 struct nhop_object *nh = nhop_alloc(fibnum, dst->sa_family); in rib_add_redirect() 225 error = rib_add_route_px(fibnum, dst, -1, in rib_add_redirect() 242 rt_missmsg_fib(RTM_REDIRECT, &info, flags | RTF_UP, error, fibnum); in rib_add_redirect() 251 rtioctl_fib(u_long req, caddr_t data, u_int fibnum) in rtioctl_fib() argument 262 return mrt_ioctl ? mrt_ioctl(req, data, fibnum) : EOPNOTSUPP; in rtioctl_fib() 270 const struct sockaddr *gateway, u_int fibnum) in ifa_ifwithroute() argument [all …]
|
H A D | rtsock.c | 212 static int handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, 218 struct mbuf *m, sa_family_t saf, u_int fibnum, 220 static void rtsock_notify_event(uint32_t fibnum, const struct rib_cmd_info *rc); 280 uint32_t fibnum = (uint32_t)(uintptr_t)_cbdata; in report_route_event() local 284 rt_routemsg(rc->rc_cmd, rc->rc_rt, nh, fibnum); in report_route_event() 288 rts_handle_route_event(uint32_t fibnum, const struct rib_cmd_info *rc) in rts_handle_route_event() argument 294 (void *)(uintptr_t)fibnum); in rts_handle_route_event() 297 report_route_event(rc, (void *)(uintptr_t)fibnum); in rts_handle_route_event() 306 rtsock_notify_event(uint32_t fibnum, const struct rib_cmd_info *rc) in rtsock_notify_event() argument 308 netlink_callback_p->route_f(fibnum, rc); in rtsock_notify_event() [all …]
|
/freebsd/sys/net/route/ |
H A D | route_ctl.h | 55 int rib_add_route_px(uint32_t fibnum, struct sockaddr *dst, int plen, 57 int rib_del_route_px(uint32_t fibnum, struct sockaddr *dst, int plen, 60 int rib_del_route_px_gw(uint32_t fibnum, struct sockaddr *dst, int plen, 70 int rib_add_route(uint32_t fibnum, struct rt_addrinfo *info, 72 int rib_del_route(uint32_t fibnum, struct rt_addrinfo *info, 74 int rib_change_route(uint32_t fibnum, struct rt_addrinfo *info, 76 int rib_action(uint32_t fibnum, int action, struct rt_addrinfo *info, 80 int rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info); 82 int rib_add_default_route(uint32_t fibnum, int family, struct ifnet *ifp, 89 int rib_add_redirect(u_int fibnum, struct sockaddr *dst, [all …]
|
H A D | route_helpers.c | 113 rib_walk_ext(uint32_t fibnum, int family, bool wlock, rib_walktree_f_t *wa_f, in rib_walk_ext() argument 118 if ((rnh = rt_tables_get_rnh(fibnum, family)) != NULL) in rib_walk_ext() 129 rib_walk(uint32_t fibnum, int family, bool wlock, rib_walktree_f_t *wa_f, in rib_walk() argument 133 rib_walk_ext(fibnum, family, wlock, wa_f, NULL, arg); in rib_walk() 146 rib_walk_from(uint32_t fibnum, int family, uint32_t flags, struct sockaddr *prefix, in rib_walk_from() argument 150 struct rib_head *rnh = rt_tables_get_rnh(fibnum, family); in rib_walk_from() 180 for (uint32_t fibnum = 0; fibnum < rt_numfibs; fibnum++) { in rib_foreach_table_walk() local 183 rib_walk_ext(fibnum, family, wlock, wa_f, hook_f, arg); in rib_foreach_table_walk() 188 rib_walk_ext(fibnum, i, wlock, wa_f, hook_f, arg); in rib_foreach_table_walk() 202 for (uint32_t fibnum = 0; fibnum < rt_numfibs; fibnum++) { in rib_foreach_table_walk_del() local [all …]
|
H A D | route_ifaddrs.c | 73 rib_handle_ifaddr_one(uint32_t fibnum, int cmd, struct rt_addrinfo *info) in rib_handle_ifaddr_one() argument 79 error = rib_action(fibnum, cmd, info, &rc); in rib_handle_ifaddr_one() 85 rt_routemsg(cmd, rc.rc_rt, nh, fibnum); in rib_handle_ifaddr_one() 99 rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info) in rib_handle_ifaddr_info() argument 105 error = rib_handle_ifaddr_one(fibnum, cmd, info); in rib_handle_ifaddr_info() 108 for (fibnum = 0; fibnum < V_rt_numfibs; fibnum++) { in rib_handle_ifaddr_info() 109 error = rib_handle_ifaddr_one(fibnum, cmd, info); in rib_handle_ifaddr_info()
|
H A D | route_ctl.c | 148 get_rnh(uint32_t fibnum, const struct rt_addrinfo *info) in get_rnh() argument 153 KASSERT((fibnum < rt_numfibs), ("rib_add_route: bad fibnum")); in get_rnh() 156 rnh = rt_tables_get_rnh(fibnum, dst->sa_family); in get_rnh() 480 rib_add_route_px(uint32_t fibnum, struct sockaddr *dst, int plen, in rib_add_route_px() argument 492 struct rib_head *rnh = rt_tables_get_rnh(fibnum, dst->sa_family); in rib_add_route_px() 535 rib_del_route_px_gw(uint32_t fibnum, struct sockaddr *dst, int plen, in rib_del_route_px_gw() argument 540 return (rib_del_route_px(fibnum, dst, plen, match_gw_one, &gwd, op_flags, rc)); in rib_del_route_px_gw() 558 rib_del_route_px(uint32_t fibnum, struct sockaddr *dst, int plen, in rib_del_route_px() argument 571 struct rib_head *rnh = rt_tables_get_rnh(fibnum, dst->sa_family); in rib_del_route_px() 692 rib_add_route(uint32_t fibnum, struct rt_addrinfo *info, in rib_add_route() argument [all …]
|
H A D | route_tables.c | 95 int fibnum; in sysctl_my_fibnum() local 98 fibnum = curthread->td_proc->p_fibnum; in sysctl_my_fibnum() 99 error = sysctl_handle_int(oidp, &fibnum, 0, req); in sysctl_my_fibnum() 157 if (uap->fibnum >= 0 && uap->fibnum < V_rt_numfibs) in sys_setfib() 158 td->td_proc->p_fibnum = uap->fibnum; in sys_setfib()
|
H A D | route_var.h | 44 typedef int rnh_set_nh_pfxflags_f_t(u_int fibnum, const struct sockaddr *addr, 47 typedef int rnh_augment_nh_f_t(u_int fibnum, struct nhop_object *nh); 128 int rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum); 320 int fibnum); 321 int rtsock_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum); 322 int rtsock_addrmsg(int cmd, struct ifaddr *ifa, int fibnum);
|
/freebsd/usr.bin/netstat/ |
H A D | nhgrp.c | 193 dump_nhgrp_sysctl(int fibnum, int af, struct nhops_dump *nd) in dump_nhgrp_sysctl() argument 209 mib[6] = fibnum; in dump_nhgrp_sysctl() 212 af, fibnum); in dump_nhgrp_sysctl() 216 xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhgrpdump.%d", af, fibnum); in dump_nhgrp_sysctl() 250 print_nhgrp_sysctl(int fibnum, int af) in print_nhgrp_sysctl() argument 256 dump_nhgrp_sysctl(fibnum, af, &nd); in print_nhgrp_sysctl() 309 prepare_nh_map(int fibnum, int af) in prepare_nh_map() argument 315 dump_nhops_sysctl(fibnum, af, &nd); in prepare_nh_map() 327 nhgrp_print(int fibnum, int af) in nhgrp_print() argument 333 if (fibnum == -1 && in nhgrp_print() [all …]
|
H A D | nhops.c | 336 dump_nhops_sysctl(int fibnum, int af, struct nhops_dump *nd) in dump_nhops_sysctl() argument 352 mib[6] = fibnum; in dump_nhops_sysctl() 355 fibnum); in dump_nhops_sysctl() 359 xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhdump.%d", af, fibnum); in dump_nhops_sysctl() 393 print_nhops_sysctl(int fibnum, int af) in print_nhops_sysctl() argument 400 dump_nhops_sysctl(fibnum, af, &nd); in print_nhops_sysctl() 453 nhops_print(int fibnum, int af) in nhops_print() argument 459 if (fibnum == -1 && in nhops_print() 460 sysctlbyname("net.my_fibnum", &fibnum, &intsize, NULL, 0) == -1) in nhops_print() 461 fibnum = 0; in nhops_print() [all …]
|
H A D | route.c | 111 routepr(int fibnum, int af) in routepr() argument 120 if (fibnum == -1 && in routepr() 121 sysctlbyname("net.my_fibnum", &fibnum, &intsize, NULL, 0) == -1) in routepr() 122 fibnum = 0; in routepr() 125 if (fibnum < 0 || fibnum > numfibs - 1) in routepr() 126 xo_errx(EX_USAGE, "%d: invalid fib", fibnum); in routepr() 137 if (fibnum) in routepr() 138 xo_emit(" ({L:fib}: {:fib/%d})", fibnum); in routepr() 141 p_rtable_sysctl(fibnum, af); in routepr() 143 p_rtable_netlink(fibnum, af); in routepr() [all …]
|
/freebsd/sys/netinet/ |
H A D | in_fib.c | 112 fib4_lookup(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, in fib4_lookup() argument 116 struct fib_dp *dp = &V_inet_dp[fibnum]; in fib4_lookup() 134 fib4_lookup(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, in fib4_lookup() argument 142 KASSERT((fibnum < rt_numfibs), ("fib4_lookup: bad fibnum")); in fib4_lookup() 143 rh = rt_tables_get_rnh(fibnum, AF_INET); in fib4_lookup() 213 lookup_nhop(uint32_t fibnum, struct in_addr dst, uint32_t scopeid) in lookup_nhop() argument 220 KASSERT((fibnum < rt_numfibs), ("fib4_check_urpf: bad fibnum")); in lookup_nhop() 221 rh = rt_tables_get_rnh(fibnum, AF_INET); in lookup_nhop() 252 fib4_check_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, in fib4_check_urpf() argument 257 struct fib_dp *dp = &V_inet_dp[fibnum]; in fib4_check_urpf() [all …]
|
H A D | in_fib.h | 49 struct nhop_object *fib4_lookup(uint32_t fibnum, struct in_addr dst, 51 int fib4_check_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, 53 struct rtentry *fib4_lookup_rt(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, 55 struct nhop_object *fib4_lookup_debugnet(uint32_t fibnum, struct in_addr dst,
|
H A D | in_rmx.c | 53 rib4_set_nh_pfxflags(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask, in rib4_set_nh_pfxflags() argument 87 rib4_augment_nh(u_int fibnum, struct nhop_object *nh) in rib4_augment_nh() argument 117 in_inithead(uint32_t fibnum) in in_inithead() argument 121 rh = rt_table_init(32, AF_INET, fibnum); in in_inithead()
|
/freebsd/sys/netinet6/ |
H A D | in6_fib.c | 120 fib6_lookup(uint32_t fibnum, const struct in6_addr *dst6, in fib6_lookup() argument 124 struct fib_dp *dp = &V_inet6_dp[fibnum]; in fib6_lookup() 142 fib6_lookup(uint32_t fibnum, const struct in6_addr *dst6, in fib6_lookup() argument 150 KASSERT((fibnum < rt_numfibs), ("fib6_lookup: bad fibnum")); in fib6_lookup() 151 rh = rt_tables_get_rnh(fibnum, AF_INET6); in fib6_lookup() 222 lookup_nhop(uint32_t fibnum, const struct in6_addr *dst6, in lookup_nhop() argument 230 KASSERT((fibnum < rt_numfibs), ("fib6_check_urpf: bad fibnum")); in lookup_nhop() 231 rh = rt_tables_get_rnh(fibnum, AF_INET6); in lookup_nhop() 266 fib6_check_urpf(uint32_t fibnum, const struct in6_addr *dst6, in fib6_check_urpf() argument 271 struct fib_dp *dp = &V_inet6_dp[fibnum]; in fib6_check_urpf() [all …]
|
H A D | in6_fib.h | 36 struct nhop_object *fib6_lookup(uint32_t fibnum, 39 int fib6_check_urpf(uint32_t fibnum, const struct in6_addr *dst6, 41 struct rtentry *fib6_lookup_rt(uint32_t fibnum, const struct in6_addr *dst6, 43 struct nhop_object *fib6_lookup_debugnet(uint32_t fibnum, 45 struct nhop_object *fib6_radix_lookup_nh(uint32_t fibnum,
|
H A D | in6_src.c | 175 in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, in in6_selectsrc() argument 225 fibnum)) in in6_selectsrc() 290 (inp != NULL) ? inp->inp_inc.inc_fibnum : fibnum)) != 0) in in6_selectsrc() 552 uint32_t fibnum; in in6_selectsrc_socket() local 555 fibnum = inp->inp_inc.inc_fibnum; in in6_selectsrc_socket() 558 error = in6_selectsrc(fibnum, dstsock, opts, inp, cred, &retifp, srcp); in in6_selectsrc_socket() 589 in6_selectsrc_addr(uint32_t fibnum, const struct in6_addr *dst, in in6_selectsrc_addr() argument 605 error = in6_selectsrc(fibnum, &dst_sa, NULL, NULL, NULL, &retifp, srcp); in in6_selectsrc_addr() 613 cache_route(uint32_t fibnum, const struct sockaddr_in6 *dst, struct route_in6 *ro, in cache_route() argument 638 ro->ro_nh = fib6_lookup(fibnum, paddr, scopeid, NHR_REF, flowid); in cache_route() [all …]
|
H A D | in6_rmx.c | 94 rib6_set_nh_pfxflags(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask, 110 rib6_augment_nh(u_int fibnum, struct nhop_object *nh) 141 in6_inithead(uint32_t fibnum) 147 AF_INET6, fibnum); in in6_inithead() 156 KASSERT(rs != NULL, ("Unable to subscribe to fib %u\n", fibnum)); in in6_inithead() 95 rib6_set_nh_pfxflags(u_int fibnum,const struct sockaddr * addr,const struct sockaddr * mask,struct nhop_object * nh) rib6_set_nh_pfxflags() argument 111 rib6_augment_nh(u_int fibnum,struct nhop_object * nh) rib6_augment_nh() argument 142 in6_inithead(uint32_t fibnum) in6_inithead() argument
|
/freebsd/sys/tests/fib_lookup/ |
H A D | fib_lookup.c | 161 run_test_inet_one_pass(uint32_t fibnum) in run_test_inet_one_pass() argument 171 fib4_lookup(fibnum, a[i], 0, NHR_NONE, 0); in run_test_inet_one_pass() 201 uint32_t fibnum = curthread->td_proc->p_fibnum; in run_test_inet() local 206 pass_packets = run_test_inet_one_pass(fibnum); in run_test_inet() 226 run_test_inet6_one_pass(uint32_t fibnum) in run_test_inet6_one_pass() argument 236 fib6_lookup(fibnum, &a[i], 0, NHR_NONE, 0); in run_test_inet6_one_pass() 266 uint32_t fibnum = curthread->td_proc->p_fibnum; in run_test_inet6() local 271 pass_packets = run_test_inet6_one_pass(fibnum); in run_test_inet6() 291 cmp_dst(uint32_t fibnum, struct in_addr a) in cmp_dst() argument 297 nh_fib = fib4_lookup(fibnum, a, 0, NHR_NONE, 0); in cmp_dst() [all …]
|
/freebsd/sys/netlink/route/ |
H A D | rt.c | 267 dump_px(uint32_t fibnum, const struct nlmsghdr *hdr, in dump_px() argument 286 if (fibnum < 255) in dump_px() 287 rtm->rtm_table = (unsigned char)fibnum; in dump_px() 292 nlattr_add_u32(nw, NL_RTA_TABLE, fibnum); in dump_px() 318 FIB_LOG(LOG_NOTICE, fibnum, family, "unsupported rt family: %d", family); in dump_px() 350 report_operation(uint32_t fibnum, struct rib_cmd_info *rc, in report_operation() argument 376 dump_px(fibnum, hdr, rc->rc_rt, &rnd, &nw); in report_operation() 380 rtsock_callback_p->route_f(fibnum, rc); in report_operation() 533 uint32_t fibnum; member 556 error = dump_px(wa->fibnum, &wa->hdr, rt, &wa->rnd, wa->nw); in dump_rtentry() [all …]
|
/freebsd/sys/contrib/dpdk_rte_lpm/ |
H A D | dpdk_lpm6.c | 74 uint32_t fibnum; member 87 return (fib6_radix_lookup_nh(rte_ext->fibnum, dst6, scopeid)); in lookup_ptr_ll() 177 rt = rt_get_inet6_parent(dd->fibnum, addr6, plen); in pack_parent_rule() 372 dd->fibnum, dd->routes_added); in check_dump_success() 404 dd->fibnum = dd_prev->fibnum; in build_table() 426 init_table(uint32_t fibnum, struct fib_data *fd, void *_old_data, void **data) in init_table() argument 432 dd_base.fibnum = fibnum; in init_table()
|
H A D | dpdk_lpm.c | 69 uint32_t fibnum; member 142 rt = rt_get_inet_parent(dd->fibnum, addr, plen); in get_parent_rule() 310 dd->fibnum, dd->routes_added); in check_dump_success() 342 dd->fibnum = dd_prev->fibnum; in build_table() 364 init_table(uint32_t fibnum, struct fib_data *fd, void *_old_data, void **data) in init_table() argument 370 dd_base.fibnum = fibnum; in init_table()
|
/freebsd/tests/atf_python/sys/net/ |
H A D | tools.py | 55 def get_routes(cls, family: str, fibnum: int = 0): 58 "{} {} -rnW -F {} --libxo json".format(cls.NETSTAT_PATH, family_key, fibnum) 68 def get_nhops(cls, family: str, fibnum: int = 0): 71 "{} {} -onW -F {} --libxo json".format(cls.NETSTAT_PATH, family_key, fibnum)
|
/freebsd/sys/compat/linux/ |
H A D | linux_netlink.c | 145 uint32_t fibnum = _rta_get_uint32(rta); in rtnl_route_from_linux() local 146 RT_LOG(LOG_DEBUG3, "GET RTABLE: %u", fibnum); in rtnl_route_from_linux() 147 if (fibnum == 254) { in rtnl_route_from_linux() 458 uint32_t fibnum; in rtnl_newroute_to_linux() local 459 fibnum = _rta_get_uint32(rta); in rtnl_newroute_to_linux() 460 if (fibnum == 0) in rtnl_newroute_to_linux() 461 fibnum = 254; in rtnl_newroute_to_linux() 462 RT_LOG(LOG_DEBUG3, "XFIBNUM %u", fibnum); in rtnl_newroute_to_linux() 463 if (!nlattr_add_u32(nw, NL_RTA_TABLE, fibnum)) in rtnl_newroute_to_linux()
|
/freebsd/usr.sbin/arp/ |
H A D | arp_netlink.c | 95 uint32_t fibnum = 0; in get_myfib() local 96 size_t len = sizeof(fibnum); in get_myfib() 98 sysctlbyname("net.my_fibnum", (void *)&fibnum, &len, NULL, 0); in get_myfib() 100 return (fibnum); in get_myfib() 104 guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr) in guess_ifindex() argument 116 snl_add_msg_attr_u32(&nw, RTA_TABLE, fibnum); in guess_ifindex() 147 snl_add_msg_attr_u32(&nw, NHAF_TABLE, fibnum); in guess_ifindex()
|