Home
last modified time | relevance | path

Searched refs:num_nhops (Results 1 – 19 of 19) sorted by relevance

/freebsd-14-stable/sys/net/route/
HDnhgrp_ctl.c79 static void sort_weightened_nhops(struct weightened_nhop *wn, int num_nhops);
82 struct weightened_nhop *wn, int num_nhops, uint32_t uidx, int *perror);
108 sort_weightened_nhops(struct weightened_nhop *wn, int num_nhops) in sort_weightened_nhops() argument
111 qsort(wn, num_nhops, sizeof(struct weightened_nhop), wn_cmp_idx); in sort_weightened_nhops()
215 get_nhgrp_alloc_size(uint32_t nhg_size, uint32_t num_nhops) in get_nhgrp_alloc_size() argument
222 sz += num_nhops * sizeof(struct weightened_nhop); in get_nhgrp_alloc_size()
280 alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) in alloc_nhgrp() argument
286 nhgrp_size = calc_min_mpath_slots(wn, num_nhops); in alloc_nhgrp()
292 size_t sz = get_nhgrp_alloc_size(nhgrp_size, num_nhops); in alloc_nhgrp()
297 num_nhops, nhgrp_size); in alloc_nhgrp()
[all …]
HDroute_helpers.c385 uint32_t num_nhops; in rib_decompose_notification() local
393 wn = nhgrp_get_nhops((struct nhgrp_object *)rc->rc_nh_new, &num_nhops); in rib_decompose_notification()
394 for (uint32_t i = 0; i < num_nhops; i++) { in rib_decompose_notification()
401 wn = nhgrp_get_nhops((struct nhgrp_object *)rc->rc_nh_old, &num_nhops); in rib_decompose_notification()
402 for (uint32_t i = 0; i < num_nhops; i++) { in rib_decompose_notification()
HDroute_ctl.c1144 uint32_t num_nhops; in change_mpath_route() local
1146 wn = nhgrp_get_nhops(rnd_orig->rnd_nhgrp, &num_nhops); in change_mpath_route()
1147 for (int i = 0; i < num_nhops; i++) { in change_mpath_route()
1162 wn_new = mallocarray(num_nhops, sizeof(struct weightened_nhop), in change_mpath_route()
1169 memcpy(wn_new, wn, num_nhops * sizeof(struct weightened_nhop)); in change_mpath_route()
1173 error = nhgrp_get_group(rnh, wn_new, num_nhops, 0, &rnd_new.rnd_nhgrp); in change_mpath_route()
1517 uint32_t num_nhops; in rib_walk_del() local
1520 wn = nhgrp_get_nhops(nhg, &num_nhops); in rib_walk_del()
1521 for (int i = 0; i < num_nhops; i++) in rib_walk_del()
HDroute_rtentry.c118 uint32_t num_nhops; in destroy_rtentry() local
119 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in destroy_rtentry()
HDfib_algo.h42 uint32_t num_nhops; member
HDnhop.h226 struct weightened_nhop *wn, int num_nhops, int *perror);
HDroute_ctl.h179 int nhgrp_get_group(struct rib_head *rh, struct weightened_nhop *wn, int num_nhops,
HDfib_algo.c1717 rinfo->num_nhops = nhops_get_count(rh); in fib_get_rtable_info()
/freebsd-14-stable/sys/netlink/route/
HDrt.c182 uint32_t num_nhops; in dump_rc_nhg() local
183 const struct weightened_nhop *wn = nhgrp_get_nhops(nhg, &num_nhops); in dump_rc_nhg()
195 for (int i = 0; i < num_nhops; i++) { in dump_rc_nhg()
428 u_int num_nhops; member
446 mp->num_nhops = 0; in nlattr_get_multipath()
457 mpnh = &mp->nhops[mp->num_nhops++]; in nlattr_get_multipath()
463 mp->num_nhops - 1); in nlattr_get_multipath()
470 if (data_len != 0 || mp->num_nhops == 0) { in nlattr_get_multipath()
859 int num_nhops = attrs->rta_multipath->num_nhops; in create_nexthop_from_attrs() local
860 struct weightened_nhop *wn = npt_alloc(npt, sizeof(*wn) * num_nhops); in create_nexthop_from_attrs()
[all …]
HDnexthop.c274 uint32_t num_nhops; in clone_unhop() local
303 num_nhops = unhop->un_nhgrp_count; in clone_unhop()
305 if (num_nhops > MAX_STACK_NHOPS) { in clone_unhop()
306 wn_new = malloc(num_nhops * sizeof(struct weightened_nhop), M_TEMP, M_NOWAIT); in clone_unhop()
312 for (int i = 0; i < num_nhops; i++) { in clone_unhop()
325 error = nhgrp_get_group(rh, wn_new, num_nhops, unhop->un_idx, &nhg); in clone_unhop()
410 uint32_t num_nhops = unhop->un_nhgrp_count; in dump_nhgrp() local
413 nla_len += NETLINK_ALIGN(num_nhops * sizeof(struct nexthop_grp)); in dump_nhgrp()
419 for (int i = 0; i < num_nhops; i++) { in dump_nhgrp()
/freebsd-14-stable/sys/netinet/
HDin_fib.c199 uint32_t num_nhops; in check_urpf() local
200 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in check_urpf()
201 for (int i = 0; i < num_nhops; i++) { in check_urpf()
HDin_fib_dxr.c1053 da->d_bits, dxr_x, rinfo.num_prefixes, rinfo.num_nhops); in dxr_build()
/freebsd-14-stable/sys/netinet6/
HDin6_fib.c208 uint32_t num_nhops; in check_urpf() local
209 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in check_urpf()
210 for (int i = 0; i < num_nhops; i++) { in check_urpf()
/freebsd-14-stable/usr.bin/netstat/
HDroute_netlink.c238 if (rt.rta_multipath.num_nhops != 0) { in p_rtentry_netlink()
241 for (uint32_t i = 0; i < rt.rta_multipath.num_nhops; i++) { in p_rtentry_netlink()
/freebsd-14-stable/sbin/route/
HDroute_netlink.c536 if (r.rta_multipath.num_nhops != 0) { in print_nlmsg_route()
542 for (uint32_t i = 0; i < r.rta_multipath.num_nhops; i++) { in print_nlmsg_route()
837 if (r->rta_multipath.num_nhops != 0) { in flushroute_one()
838 for (uint32_t i = 0; i < r->rta_multipath.num_nhops; i++) { in flushroute_one()
/freebsd-14-stable/sys/net/
HDrtsock.c738 uint32_t num_nhops; in select_nhop() local
739 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in select_nhop()
742 for (int i = 0; i < num_nhops; i++) { in select_nhop()
2240 uint32_t num_nhops; in sysctl_dumpentry() local
2242 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in sysctl_dumpentry()
2243 for (int i = 0; i < num_nhops; i++) { in sysctl_dumpentry()
/freebsd-14-stable/usr.sbin/arp/
HDarp_netlink.c133 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
/freebsd-14-stable/usr.sbin/ndp/
HDndp_netlink.c169 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
/freebsd-14-stable/sys/netlink/
HDnetlink_snl_route_parsers.h93 uint32_t num_nhops; member