/freebsd/sys/net/route/ |
H A D | nhgrp_ctl.c | 78 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 D | 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()
|
H A D | route_ctl.c | 1143 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 D | 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()
|
H A D | fib_algo.h | 42 uint32_t num_nhops; member
|
H A D | nhop.h | 226 struct weightened_nhop *wn, int num_nhops, int *perror);
|
H A D | route_ctl.h | 179 int nhgrp_get_group(struct rib_head *rh, struct weightened_nhop *wn, int num_nhops,
|
H A D | fib_algo.c | 1717 rinfo->num_nhops = nhops_get_count(rh); in fib_get_rtable_info()
|
/freebsd/sys/netlink/route/ |
H A D | 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 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 D | 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/sys/netinet/ |
H A D | 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()
|
H A D | in_fib_dxr.c | 1053 da->d_bits, dxr_x, rinfo.num_prefixes, rinfo.num_nhops); in dxr_build()
|
/freebsd/sys/netinet6/ |
H A D | 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/usr.bin/netstat/ |
H A D | route_netlink.c | 236 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 D | route_netlink.c | 541 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 D | rtsock.c | 724 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 D | arp_netlink.c | 132 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
|
/freebsd/usr.sbin/ndp/ |
H A D | ndp_netlink.c | 167 if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY)) in guess_ifindex()
|
/freebsd/sys/netlink/ |
H A D | netlink_snl_route_parsers.h | 93 uint32_t num_nhops; member
|