/freebsd-13-stable/sys/net/route/ |
H A D | route_temporal.c | 79 * Per-rnh callout function traversing the tree and deleting 86 struct rib_head *rnh; local 90 rnh = (struct rib_head *)arg; 92 CURVNET_SET(rnh->rib_vnet); 95 rib_walk_del(rnh->rib_fibnum, rnh->rib_family, expire_route, 98 RIB_WLOCK(rnh); 103 callout_reset_sbt(&rnh->expire_callout, SBT_1S * seconds, 104 SBT_1MS * 500, expire_callout, rnh, 0); 105 rnh 126 tmproutes_update(struct rib_head *rnh, struct rtentry *rt) argument [all...] |
H A D | route_ctl.c | 70 struct rib_head *rnh; member in struct:rib_subscription 75 static int add_route(struct rib_head *rnh, struct rt_addrinfo *info, 77 static int add_route_nhop(struct rib_head *rnh, struct rtentry *rt, 80 static int del_route(struct rib_head *rnh, struct rt_addrinfo *info, 82 static int change_route(struct rib_head *rnh, struct rt_addrinfo *info, 85 static int rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo *info, 88 static void rib_notify(struct rib_head *rnh, enum rib_subscription_type type, 137 * At this moment rnh, nh_control may be already freed. 189 struct rib_head *rnh; local 195 rnh 494 lookup_prefix_bysa(struct rib_head *rnh, const struct sockaddr *dst, const struct sockaddr *netmask, struct route_nhop_data *rnd) argument 521 lookup_prefix(struct rib_head *rnh, const struct rt_addrinfo *info, struct route_nhop_data *rnd) argument 542 struct rib_head *rnh; local 576 create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info, struct rtentry **prt) argument 651 add_route(struct rib_head *rnh, struct rt_addrinfo *info, struct rib_cmd_info *rc) argument 732 struct rib_head *rnh; local 771 rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo *info, struct rib_cmd_info *rc) argument 827 del_route(struct rib_head *rnh, struct rt_addrinfo *info, struct rib_cmd_info *rc) argument 866 struct rib_head *rnh; local 923 change_nhop(struct rib_head *rnh, struct rt_addrinfo *info, struct nhop_object *nh_orig, struct nhop_object **nh_new) argument 964 change_mpath_route(struct rib_head *rnh, struct rt_addrinfo *info, struct route_nhop_data *rnd_orig, struct rib_cmd_info *rc) argument 1023 change_route(struct rib_head *rnh, struct rt_addrinfo *info, struct route_nhop_data *rnd_orig, struct rib_cmd_info *rc) argument 1054 add_route_nhop(struct rib_head *rnh, struct rtentry *rt, struct rt_addrinfo *info, struct route_nhop_data *rnd, struct rib_cmd_info *rc) argument 1100 change_route_nhop(struct rib_head *rnh, struct rtentry *rt, struct rt_addrinfo *info, struct route_nhop_data *rnd, struct rib_cmd_info *rc) argument 1153 change_route_conditional(struct rib_head *rnh, struct rtentry *rt, struct rt_addrinfo *info, struct route_nhop_data *rnd_orig, struct route_nhop_data *rnd_new, struct rib_cmd_info *rc) argument 1242 struct rib_head *rnh; member in struct:rt_delinfo 1304 struct rib_head *rnh; local 1367 struct rib_head *rnh = (struct rib_head *)arg; local 1381 rib_flush_routes(struct rib_head *rnh) argument 1391 struct rib_head *rnh; local 1400 rib_notify(struct rib_head *rnh, enum rib_subscription_type type, struct rib_cmd_info *rc) argument 1439 struct rib_head *rnh; local 1451 rib_subscribe_internal(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, enum rib_subscription_type type, bool waitok) argument 1471 rib_subscribe_locked(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, enum rib_subscription_type type) argument 1495 struct rib_head *rnh = rs->rnh; local 1510 struct rib_head *rnh = rs->rnh; local 1535 rib_init_subscriptions(struct rib_head *rnh) argument 1542 rib_destroy_subscriptions(struct rib_head *rnh) argument [all...] |
H A D | route_helpers.c | 71 rib_walk_ext_locked(struct rib_head *rnh, rib_walktree_f_t *wa_f, argument 75 hook_f(rnh, RIB_WALK_HOOK_PRE, arg); 76 rnh->rnh_walktree(&rnh->head, (walktree_f_t *)wa_f, arg); 78 hook_f(rnh, RIB_WALK_HOOK_POST, arg); 91 rib_walk_ext_internal(struct rib_head *rnh, bool wlock, rib_walktree_f_t *wa_f, argument 97 RIB_WLOCK(rnh); 99 RIB_RLOCK(rnh); 100 rib_walk_ext_locked(rnh, wa_f, hook_f, arg); 102 RIB_WUNLOCK(rnh); 111 struct rib_head *rnh; local 145 struct rib_head *rnh = rt_tables_get_rnh(fibnum, family); local [all...] |
H A D | route_var.h | 122 rib_bump_gen(struct rib_head *rnh) argument 125 rnh->rnh_gen_rib++; 127 rnh->rnh_gen++; 217 void tmproutes_update(struct rib_head *rnh, struct rtentry *rt); 223 int change_route_nhop(struct rib_head *rnh, struct rtentry *rt, 226 int change_route_conditional(struct rib_head *rnh, struct rtentry *rt, 229 struct rtentry *lookup_prefix(struct rib_head *rnh, 243 void rib_init_subscriptions(struct rib_head *rnh); 244 void rib_destroy_subscriptions(struct rib_head *rnh); 258 int nhop_create_from_info(struct rib_head *rnh, struc [all...] |
H A D | mpath_ctl.c | 94 add_route_mpath(struct rib_head *rnh, struct rt_addrinfo *info, argument 108 error = nhgrp_get_addition_group(rnh, rnd_orig, rnd_add, 119 RIB_RLOCK(rnh); 120 lookup_prefix(rnh, info, rnd_orig); 121 RIB_RUNLOCK(rnh); 125 error = change_route_conditional(rnh, rt, info, rnd_orig,
|
H A D | route_ctl.h | 66 #define RIB_FLAG_WLOCK 0x01 /* Need exclusive rnh lock */ 67 #define RIB_FLAG_LOCKED 0x02 /* Do not explicitly acquire rnh lock */ 74 typedef void rib_walk_hook_f_t(struct rib_head *rnh, enum rib_walk_hook stage, 80 void rib_walk_ext_internal(struct rib_head *rnh, bool wlock, 82 void rib_walk_ext_locked(struct rib_head *rnh, rib_walktree_f_t *wa_f, 146 typedef void rib_subscription_cb_t(struct rib_head *rnh, struct rib_cmd_info *rc, 152 struct rib_subscription *rib_subscribe_internal(struct rib_head *rnh, 155 struct rib_subscription *rib_subscribe_locked(struct rib_head *rnh,
|
H A D | route_tables.c | 278 struct rib_head *rnh; local 288 rnh = rt_tables_get_rnh(i, family); 289 dom->dom_rtdetach(rnh); 325 /* rnh is [fib=0][af=0]. */ 343 struct rib_head *rnh; local 345 rnh = rt_tables_get_rnh_ptr(table, family); 346 KASSERT(rnh != NULL, ("%s: NULL rib_head pointer table %d family %d", 348 return (rnh->rnh_gen);
|
H A D | route_ddb.c | 170 struct rib_head *rnh; local 181 rnh = rt_tables_get_rnh(0, i); 182 if (rnh == NULL) { 199 error = rnh->rnh_walktree(&rnh->head, rt_dumpentry_ddb, NULL);
|
H A D | fib_algo.h | 80 typedef enum flm_op_result flm_change_t(struct rib_head *rnh, 82 typedef enum flm_op_result flm_change_batch_t(struct rib_head *rnh,
|
H A D | nhop_ctl.c | 83 static int get_nhop(struct rib_head *rnh, struct rt_addrinfo *info, 318 nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo *info, argument 337 error = get_nhop(rnh, info, &nh_priv); 354 get_nhop(struct rib_head *rnh, struct rt_addrinfo *info, argument 368 error = rnh->rnh_preadd(rnh->rib_fibnum, dst, netmask, nh_priv->nh); 374 tmp_priv = find_nhop(rnh->nh_control, nh_priv); 390 error = finalize_nhop(rnh->nh_control, info, nh_priv); 456 nhop_create_from_nhop(struct rib_head *rnh, const struct nhop_object *nh_orig, argument 486 error = get_nhop(rnh, inf [all...] |
H A D | fib_algo.c | 773 handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, argument 779 RIB_WLOCK_ASSERT(rnh); 832 result = fd->fd_flm->flm_change_rib_item_cb(rnh, rc, fd->fd_algo_data); 917 sync_algo_end_cb(struct rib_head *rnh, enum rib_walk_hook stage, void *_data) argument 924 if (rnh->rib_dying) { 1086 * rnh has `is_dying` flag set, so setup of new fd's will fail at
|
/freebsd-13-stable/sys/net/ |
H A D | radix.h | 163 #define RADIX_NODE_HEAD_LOCK_INIT(rnh) \ 164 rm_init(&(rnh)->rnh_lock, "radix node head") 165 #define RADIX_NODE_HEAD_LOCK(rnh) rm_wlock(&(rnh)->rnh_lock) 166 #define RADIX_NODE_HEAD_UNLOCK(rnh) rm_wunlock(&(rnh)->rnh_lock) 167 #define RADIX_NODE_HEAD_RLOCK(rnh) rm_rlock(&(rnh)->rnh_lock,\ 169 #define RADIX_NODE_HEAD_RUNLOCK(rnh) rm_runlock(&(rnh) [all...] |
H A D | radix.c | 1124 struct radix_node_head *rnh; local 1127 rnh = *head; 1133 R_Zalloc(rnh, struct radix_node_head *, sizeof (*rnh)); 1135 if (rnh == NULL || rmh == NULL) { 1136 if (rnh != NULL) 1137 R_Free(rnh); 1144 rn_inithead_internal(&rnh->rh, rnh->rnh_nodes, off); 1146 *head = rnh; 1163 struct radix_head * const rnh = arg; local 1175 struct radix_node_head *rnh; local [all...] |
H A D | route.c | 141 struct radix_head * const rnh = arg; local 144 x = (struct radix_node *)rn_delete(rn + 2, NULL, rnh); 468 * Called for each routing entry via the rnh->rnh_walktree() call above 474 * arg argument passed to rnh->rnh_walktree() - detaching interface 599 struct rib_head *rnh; local 611 rnh = rt_tables_get_rnh(j, i); 612 if (rnh == NULL) 614 nhops_update_ifmtu(rnh, ifp, mtu);
|
H A D | rtsock.c | 741 struct rib_head *rnh; local 747 rnh = rt_tables_get_rnh(fibnum, saf); 748 if (rnh == NULL) 751 RIB_RLOCK(rnh); 766 rc->rc_rt = (struct rtentry *) rnh->rnh_matchaddr( 767 info->rti_info[RTAX_DST], &rnh->head); 769 rc->rc_rt = (struct rtentry *) rnh->rnh_lookup( 771 info->rti_info[RTAX_NETMASK], &rnh->head); 774 RIB_RUNLOCK(rnh); 780 RIB_RUNLOCK(rnh); 2560 struct rib_head *rnh = NULL; /* silence compiler. */ local [all...] |
/freebsd-13-stable/sys/kern/ |
H A D | vfs_export.c | 109 struct radix_node_head *rnh; local 181 rnh = NULL; 185 if ((rnh = nep->ne4) == NULL) { 187 rnh = vfs_create_addrlist_af(&nep->ne4, off); 193 if ((rnh = nep->ne6) == NULL) { 195 rnh = vfs_create_addrlist_af(&nep->ne6, off); 200 if (rnh == NULL) { 207 RADIX_NODE_HEAD_LOCK(rnh); 208 rn = (*rnh->rnh_addaddr)(saddr, smask, &rnh 237 struct radix_node_head *rnh = (struct radix_node_head *) w; local 263 struct radix_node_head *rnh; local 465 struct radix_node_head *rnh; local [all...] |
/freebsd-13-stable/contrib/ipfilter/ |
H A D | radix_ipf.c | 1024 void delete_addr(ipf_rdx_head_t *rnh, int item); 1025 void dumptree(ipf_rdx_head_t *rnh); 1030 void test_addr(ipf_rdx_head_t *rnh, int pref, addrfamily_t *, int); 1212 printroots(rnh) 1213 ipf_rdx_head_t *rnh; 1216 GNAME(&rnh->nodes[0]), 1217 rnh->nodes[0].index, GNAME(rnh->nodes[0].parent), 1218 GNAME(rnh->nodes[0].left), GNAME(rnh 1234 ipf_rdx_head_t *rnh; local [all...] |
/freebsd-13-stable/sys/contrib/ipfilter/netinet/ |
H A D | radix_ipf.c | 1024 void delete_addr(ipf_rdx_head_t *rnh, int item); 1025 void dumptree(ipf_rdx_head_t *rnh); 1030 void test_addr(ipf_rdx_head_t *rnh, int pref, addrfamily_t *, int); 1212 printroots(rnh) 1213 ipf_rdx_head_t *rnh; 1216 GNAME(&rnh->nodes[0]), 1217 rnh->nodes[0].index, GNAME(rnh->nodes[0].parent), 1218 GNAME(rnh->nodes[0].left), GNAME(rnh 1234 ipf_rdx_head_t *rnh; local [all...] |
/freebsd-13-stable/sys/netinet6/ |
H A D | in6_fib_algo.c | 90 struct radix_node_head *rnh; member in struct:lradix6_data 101 struct radix_node_head *rnh = (struct radix_node_head *)algo_data; local 109 ent = (struct radix6_addr_entry *)(rn_match(&addr6, &rnh->rh)); 136 if (lr == NULL || !rn_inithead((void **)&lr->rnh, OFF_LEN_INET6)) 160 if (lr->rnh != NULL) 161 rn_detachhead((void **)&lr->rnh); 200 rn = lr->rnh->rnh_addaddr((struct sockaddr *)&ae->addr, 201 (struct sockaddr *)rt_mask, &lr->rnh->rh, ae->rn); 214 dp->arg = lr->rnh; 220 lradix6_change_cb(struct rib_head *rnh, struc argument 336 radix6_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *_data) argument [all...] |
H A D | nd6.h | 390 void nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc,
|
/freebsd-13-stable/sys/netinet/ |
H A D | in_fib_algo.c | 480 bsearch4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, argument 519 struct radix_node_head *rnh; member in struct:lradix4_data 530 struct radix_node_head *rnh = (struct radix_node_head *)algo_data; local 536 ent = (struct radix4_addr_entry *)(rn_match(&addr4, &rnh->rh)); 568 if (lr == NULL || !rn_inithead((void **)&lr->rnh, OFF_LEN_INET)) 592 if (lr->rnh != NULL) 593 rn_detachhead((void **)&lr->rnh); 630 rn = lr->rnh->rnh_addaddr((struct sockaddr *)&ae->addr, rt_mask, 631 &lr->rnh->rh, ae->rn); 644 dp->arg = lr->rnh; 650 lradix4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *_data) argument 752 radix4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *_data) argument [all...] |
/freebsd-13-stable/sbin/routed/ |
H A D | radix.c | 851 struct radix_node_head *rnh; local 855 rnh = (struct radix_node_head *)rtmalloc(sizeof(*rnh), "rn_inithead"); 856 Bzero(rnh, sizeof (*rnh)); 857 *head = rnh; 858 t = rn_newpair(rn_zeros, off, rnh->rnh_nodes); 859 ttt = rnh->rnh_nodes + 2; 867 rnh->rnh_addaddr = rn_addroute; 868 rnh [all...] |
/freebsd-13-stable/sys/netpfil/ipfw/ |
H A D | ip_fw_table_algo.c | 404 struct radix_node_head *rnh; local 411 rnh = (struct radix_node_head *)ti->state; 412 ent = (struct radix_addr_entry *)(rnh->rnh_matchaddr(&sa, &rnh->rh)); 422 rnh = (struct radix_node_head *)ti->xstate; 423 xent = (struct radix_addr_xentry *)(rnh->rnh_matchaddr(&sa6, &rnh->rh)); 460 struct radix_node_head * const rnh = arg; local 464 rnh->rnh_deladdr(rn->rn_key, rn->rn_mask, &rnh 474 struct radix_node_head *rnh; local 543 struct radix_node_head *rnh; local 573 struct radix_node_head *rnh; local 708 struct radix_node_head *rnh; local 809 struct radix_node_head *rnh; local [all...] |
/freebsd-13-stable/sys/contrib/dpdk_rte_lpm/ |
H A D | dpdk_lpm.c | 210 handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, argument
|
H A D | dpdk_lpm6.c | 268 handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, argument
|