Home
last modified time | relevance | path

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

/freebsd/sys/net/route/
H A Dnhgrp_ctl.c78 static void sort_weightened_nhops(struct weightened_nhop *wn, int num_nhops);
81 struct weightened_nhop *wn, int num_nhops, uint32_t uidx, int *perror);
107 sort_weightened_nhops(struct weightened_nhop *wn, int num_nhops) in sort_weightened_nhops() argument
110 qsort(wn, num_nhops, sizeof(struct weightened_nhop), wn_cmp_idx); in sort_weightened_nhops()
214 get_nhgrp_alloc_size(uint32_t nhg_size, uint32_t num_nhops) in get_nhgrp_alloc_size() argument
221 sz += num_nhops * sizeof(struct weightened_nhop); in get_nhgrp_alloc_size()
279 alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) in alloc_nhgrp() argument
285 nhgrp_size = calc_min_mpath_slots(wn, num_nhops); in alloc_nhgrp()
291 size_t sz = get_nhgrp_alloc_size(nhgrp_size, num_nhops); in alloc_nhgrp()
296 num_nhops, nhgrp_size); in alloc_nhgrp()
[all …]
H A Droute_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()
H A Droute_ctl.c1143 uint32_t num_nhops; in change_mpath_route() local
1145 wn = nhgrp_get_nhops(rnd_orig->rnd_nhgrp, &num_nhops); in change_mpath_route()
1146 for (int i = 0; i < num_nhops; i++) { in change_mpath_route()
1161 wn_new = mallocarray(num_nhops, sizeof(struct weightened_nhop), in change_mpath_route()
1168 memcpy(wn_new, wn, num_nhops * sizeof(struct weightened_nhop)); in change_mpath_route()
1172 error = nhgrp_get_group(rnh, wn_new, num_nhops, 0, &rnd_new.rnd_nhgrp); in change_mpath_route()
1516 uint32_t num_nhops; in rib_walk_del() local
1519 wn = nhgrp_get_nhops(nhg, &num_nhops); in rib_walk_del()
1520 for (int i = 0; i < num_nhops; i++) in rib_walk_del()
H A Droute_rtentry.c118 uint32_t num_nhops; in destroy_rtentry() local
119 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in destroy_rtentry()
H A Dfib_algo.h42 uint32_t num_nhops; member
H A Dnhop.h226 struct weightened_nhop *wn, int num_nhops, int *perror);
H A Droute_ctl.h179 int nhgrp_get_group(struct rib_head *rh, struct weightened_nhop *wn, int num_nhops,
H A Dfib_algo.c1717 rinfo->num_nhops = nhops_get_count(rh); in fib_get_rtable_info()
/freebsd/sys/netlink/route/
H A Drt.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 int num_nhops; member
441 mp->num_nhops = 0; in nlattr_get_multipath()
444 struct rta_mpath_nh *mpnh = &mp->nhops[mp->num_nhops++]; in nlattr_get_multipath()
450 mp->num_nhops - 1); in nlattr_get_multipath()
458 if (data_len != 0 || mp->num_nhops == 0) { in nlattr_get_multipath()
845 int num_nhops = attrs->rta_multipath->num_nhops; in create_nexthop_from_attrs() local
846 struct weightened_nhop *wn = npt_alloc(npt, sizeof(*wn) * num_nhops); in create_nexthop_from_attrs()
[all …]
H A Dnexthop.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/sys/netinet/
H A Din_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()
H A Din_fib_dxr.c1053 da->d_bits, dxr_x, rinfo.num_prefixes, rinfo.num_nhops); in dxr_build()
/freebsd/sys/netinet6/
H A Din6_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/usr.bin/netstat/
H A Droute_netlink.c236 if (rt.rta_multipath.num_nhops != 0) { in p_rtentry_netlink()
239 for (uint32_t i = 0; i < rt.rta_multipath.num_nhops; i++) { in p_rtentry_netlink()
/freebsd/sbin/route/
H A Droute_netlink.c541 if (r.rta_multipath.num_nhops != 0) { in print_nlmsg_route()
547 for (uint32_t i = 0; i < r.rta_multipath.num_nhops; i++) { in print_nlmsg_route()
842 if (r->rta_multipath.num_nhops != 0) { in flushroute_one()
843 for (uint32_t i = 0; i < r->rta_multipath.num_nhops; i++) { in flushroute_one()
/freebsd/sys/net/
H A Drtsock.c724 uint32_t num_nhops; in select_nhop() local
725 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in select_nhop()
728 for (int i = 0; i < num_nhops; i++) { in select_nhop()
2231 uint32_t num_nhops; in sysctl_dumpentry() local
2233 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in sysctl_dumpentry()
2234 for (int i = 0; i < num_nhops; i++) { in sysctl_dumpentry()
/freebsd/usr.sbin/arp/
H A Darp_netlink.c132 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
/freebsd/usr.sbin/ndp/
H A Dndp_netlink.c167 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
/freebsd/sys/netlink/
H A Dnetlink_snl_route_parsers.h93 uint32_t num_nhops; member