| /freebsd-14-stable/sys/net/route/ |
| HD | nhgrp_ctl.c | 79 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 …]
|
| HD | route_helpers.c | 385 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()
|
| HD | route_ctl.c | 1144 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()
|
| HD | route_rtentry.c | 118 uint32_t num_nhops; in destroy_rtentry() local 119 wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); in destroy_rtentry()
|
| HD | fib_algo.h | 42 uint32_t num_nhops; member
|
| HD | nhop.h | 226 struct weightened_nhop *wn, int num_nhops, int *perror);
|
| HD | route_ctl.h | 179 int nhgrp_get_group(struct rib_head *rh, struct weightened_nhop *wn, int num_nhops,
|
| HD | fib_algo.c | 1717 rinfo->num_nhops = nhops_get_count(rh); in fib_get_rtable_info()
|
| /freebsd-14-stable/sys/netlink/route/ |
| HD | rt.c | 182 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 …]
|
| HD | nexthop.c | 274 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/ |
| HD | in_fib.c | 199 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()
|
| HD | in_fib_dxr.c | 1053 da->d_bits, dxr_x, rinfo.num_prefixes, rinfo.num_nhops); in dxr_build()
|
| /freebsd-14-stable/sys/netinet6/ |
| HD | in6_fib.c | 208 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/ |
| HD | route_netlink.c | 238 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/ |
| HD | route_netlink.c | 536 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/ |
| HD | rtsock.c | 738 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/ |
| HD | arp_netlink.c | 133 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
|
| /freebsd-14-stable/usr.sbin/ndp/ |
| HD | ndp_netlink.c | 169 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
|
| /freebsd-14-stable/sys/netlink/ |
| HD | netlink_snl_route_parsers.h | 93 uint32_t num_nhops; member
|