Home
last modified time | relevance | path

Searched refs:rnh (Results 1 – 25 of 27) sorted by relevance

12

/f-stack/freebsd/net/route/
H A Droute_ctl.c197 return (rnh); in get_rnh()
668 RIB_WLOCK(rnh); in add_route()
1124 rn = rnh->rnh_deladdr(ndst, netmask, &rnh->head); in change_route_nhop()
1317 di.rnh = rnh; in rib_walk_del()
1323 rnh->rnh_walktree(&rnh->head, rt_checkdelroute, &di); in rib_walk_del()
1369 rn = rnh->rnh_deladdr(rt_key(rt), rt_mask(rt), &rnh->head); in rt_delete_unconditional()
1384 rnh->rnh_walktree(&rnh->head, rt_delete_unconditional, rnh); in rib_flush_routes()
1459 rs->rnh = rnh; in rib_subscribe_internal()
1481 rs->rnh = rnh; in rib_subscribe_locked()
1495 struct rib_head *rnh = rs->rnh; in rib_unsibscribe() local
[all …]
H A Droute_temporal.c86 struct rib_head *rnh; in expire_callout() local
90 rnh = (struct rib_head *)arg; in expire_callout()
92 CURVNET_SET(rnh->rib_vnet); in expire_callout()
95 rib_walk_del(rnh->rib_fibnum, rnh->rib_family, expire_route, in expire_callout()
98 RIB_WLOCK(rnh); in expire_callout()
105 rnh->next_expire = next_expire; in expire_callout()
112 rnh->next_expire = 0; in expire_callout()
114 RIB_WUNLOCK(rnh); in expire_callout()
130 RIB_WLOCK_ASSERT(rnh); in tmproutes_update()
132 if (rnh->next_expire == 0 || rnh->next_expire > rt->rt_expire) { in tmproutes_update()
[all …]
H A Droute_helpers.c75 hook_f(rnh, RIB_WALK_HOOK_PRE, arg); in rib_walk_ext_locked()
76 rnh->rnh_walktree(&rnh->head, (walktree_f_t *)wa_f, arg); in rib_walk_ext_locked()
78 hook_f(rnh, RIB_WALK_HOOK_POST, arg); in rib_walk_ext_locked()
97 RIB_WLOCK(rnh); in rib_walk_ext_internal()
99 RIB_RLOCK(rnh); in rib_walk_ext_internal()
100 rib_walk_ext_locked(rnh, wa_f, hook_f, arg); in rib_walk_ext_internal()
102 RIB_WUNLOCK(rnh); in rib_walk_ext_internal()
104 RIB_RUNLOCK(rnh); in rib_walk_ext_internal()
111 struct rib_head *rnh; in rib_walk_ext() local
113 if ((rnh = rt_tables_get_rnh(fibnum, family)) != NULL) in rib_walk_ext()
[all …]
H A Dmpath_ctl.c94 add_route_mpath(struct rib_head *rnh, struct rt_addrinfo *info, in add_route_mpath() argument
108 error = nhgrp_get_addition_group(rnh, rnd_orig, rnd_add, in add_route_mpath()
119 RIB_RLOCK(rnh); in add_route_mpath()
120 lookup_prefix(rnh, info, rnd_orig); in add_route_mpath()
121 RIB_RUNLOCK(rnh); in add_route_mpath()
125 error = change_route_conditional(rnh, rt, info, rnd_orig, in add_route_mpath()
H A Droute_var.h205 void tmproutes_update(struct rib_head *rnh, struct rtentry *rt);
211 int change_route_nhop(struct rib_head *rnh, struct rtentry *rt,
214 int change_route_conditional(struct rib_head *rnh, struct rtentry *rt,
217 struct rtentry *lookup_prefix(struct rib_head *rnh,
231 void rib_init_subscriptions(struct rib_head *rnh);
232 void rib_destroy_subscriptions(struct rib_head *rnh);
246 int nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo *info,
248 int nhop_create_from_nhop(struct rib_head *rnh, const struct nhop_object *nh_orig,
281 int add_route_mpath(struct rib_head *rnh, struct rt_addrinfo *info,
301 int nhgrp_get_addition_group(struct rib_head *rnh,
H A Droute_ctl.h70 typedef void rib_walk_hook_f_t(struct rib_head *rnh, enum rib_walk_hook stage,
76 void rib_walk_ext_internal(struct rib_head *rnh, bool wlock,
78 void rib_walk_ext_locked(struct rib_head *rnh, rib_walktree_f_t *wa_f,
140 typedef void rib_subscription_cb_t(struct rib_head *rnh, struct rib_cmd_info *rc,
146 struct rib_subscription *rib_subscribe_internal(struct rib_head *rnh,
149 struct rib_subscription *rib_subscribe_locked(struct rib_head *rnh,
H A Droute_tables.c277 struct rib_head *rnh; in rtables_destroy() local
287 rnh = rt_tables_get_rnh(i, family); in rtables_destroy()
288 dom->dom_rtdetach(rnh); in rtables_destroy()
342 struct rib_head *rnh; in rt_tables_get_gen() local
344 rnh = rt_tables_get_rnh_ptr(table, family); in rt_tables_get_gen()
345 KASSERT(rnh != NULL, ("%s: NULL rib_head pointer table %d family %d", in rt_tables_get_gen()
347 return (rnh->rnh_gen); in rt_tables_get_gen()
H A Droute_ddb.c170 struct rib_head *rnh; in DB_SHOW_COMMAND() local
181 rnh = rt_tables_get_rnh(0, i); in DB_SHOW_COMMAND()
182 if (rnh == NULL) { in DB_SHOW_COMMAND()
199 error = rnh->rnh_walktree(&rnh->head, rt_dumpentry_ddb, NULL); in DB_SHOW_COMMAND()
H A Dnhop_ctl.c83 static int get_nhop(struct rib_head *rnh, struct rt_addrinfo *info,
316 nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo *info, in nhop_create_from_info() argument
335 error = get_nhop(rnh, info, &nh_priv); in nhop_create_from_info()
352 get_nhop(struct rib_head *rnh, struct rt_addrinfo *info, in get_nhop() argument
366 error = rnh->rnh_preadd(rnh->rib_fibnum, dst, netmask, nh_priv->nh); in get_nhop()
372 tmp_priv = find_nhop(rnh->nh_control, nh_priv); in get_nhop()
388 error = finalize_nhop(rnh->nh_control, info, nh_priv); in get_nhop()
454 nhop_create_from_nhop(struct rib_head *rnh, const struct nhop_object *nh_orig, in nhop_create_from_nhop() argument
484 error = get_nhop(rnh, info, &nh_priv); in nhop_create_from_nhop()
H A Dfib_algo.h61 typedef enum flm_op_result flm_change_t(struct rib_head *rnh,
H A Dfib_algo.c538 handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, in handle_rtable_change_cb() argument
544 RIB_WLOCK_ASSERT(rnh); in handle_rtable_change_cb()
576 result = fd->fd_flm->flm_change_rib_item_cb(rnh, rc, fd->fd_algo_data); in handle_rtable_change_cb()
644 sync_algo_end_cb(struct rib_head *rnh, enum rib_walk_hook stage, void *_data) in sync_algo_end_cb() argument
651 if (rnh->rib_dying) { in sync_algo_end_cb()
/f-stack/freebsd/net/
H A Dradix.h163 #define RADIX_NODE_HEAD_LOCK_INIT(rnh) \ argument
164 rm_init(&(rnh)->rnh_lock, "radix node head")
165 #define RADIX_NODE_HEAD_LOCK(rnh) rm_wlock(&(rnh)->rnh_lock) argument
166 #define RADIX_NODE_HEAD_UNLOCK(rnh) rm_wunlock(&(rnh)->rnh_lock) argument
167 #define RADIX_NODE_HEAD_RLOCK(rnh) rm_rlock(&(rnh)->rnh_lock,\ argument
169 #define RADIX_NODE_HEAD_RUNLOCK(rnh) rm_runlock(&(rnh)->rnh_lock,\ argument
171 #define RADIX_NODE_HEAD_DESTROY(rnh) rm_destroy(&(rnh)->rnh_lock) argument
172 #define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) rm_assert(&(rnh)->rnh_lock, RA_LOCKED) argument
173 #define RADIX_NODE_HEAD_WLOCK_ASSERT(rnh) rm_assert(&(rnh)->rnh_lock, RA_WLOCKED) argument
H A Dradix.c1124 struct radix_node_head *rnh; in rn_inithead() local
1127 rnh = *head; in rn_inithead()
1133 R_Zalloc(rnh, struct radix_node_head *, sizeof (*rnh)); in rn_inithead()
1136 if (rnh != NULL) in rn_inithead()
1137 R_Free(rnh); in rn_inithead()
1144 rn_inithead_internal(&rnh->rh, rnh->rnh_nodes, off); in rn_inithead()
1146 *head = rnh; in rn_inithead()
1147 rnh->rh.rnh_masks = rmh; in rn_inithead()
1153 rnh->rnh_lookup = rn_lookup; in rn_inithead()
1175 struct radix_node_head *rnh; in rn_detachhead() local
[all …]
H A Droute.c141 struct radix_head * const rnh = arg; in rt_freeentry() local
144 x = (struct radix_node *)rn_delete(rn + 2, NULL, rnh); in rt_freeentry()
599 struct rib_head *rnh; in rt_updatemtu() local
611 rnh = rt_tables_get_rnh(j, i); in rt_updatemtu()
612 if (rnh == NULL) in rt_updatemtu()
614 nhops_update_ifmtu(rnh, ifp, mtu); in rt_updatemtu()
H A Drtsock.c732 struct rib_head *rnh; in handle_rtm_get() local
739 if (rnh == NULL) in handle_rtm_get()
742 RIB_RLOCK(rnh); in handle_rtm_get()
765 RIB_RUNLOCK(rnh); in handle_rtm_get()
771 RIB_RUNLOCK(rnh); in handle_rtm_get()
802 &rnh->head); in handle_rtm_get()
804 RIB_RUNLOCK(rnh); in handle_rtm_get()
809 RIB_RUNLOCK(rnh); in handle_rtm_get()
815 RIB_RUNLOCK(rnh); in handle_rtm_get()
2540 if (rnh != NULL) { in sysctl_rtsock()
[all …]
/f-stack/tools/compat/include/net/
H A Dradix.h163 #define RADIX_NODE_HEAD_LOCK_INIT(rnh) \ argument
164 rm_init(&(rnh)->rnh_lock, "radix node head")
165 #define RADIX_NODE_HEAD_LOCK(rnh) rm_wlock(&(rnh)->rnh_lock) argument
166 #define RADIX_NODE_HEAD_UNLOCK(rnh) rm_wunlock(&(rnh)->rnh_lock) argument
167 #define RADIX_NODE_HEAD_RLOCK(rnh) rm_rlock(&(rnh)->rnh_lock,\ argument
169 #define RADIX_NODE_HEAD_RUNLOCK(rnh) rm_runlock(&(rnh)->rnh_lock,\ argument
171 #define RADIX_NODE_HEAD_DESTROY(rnh) rm_destroy(&(rnh)->rnh_lock) argument
172 #define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) rm_assert(&(rnh)->rnh_lock, RA_LOCKED) argument
173 #define RADIX_NODE_HEAD_WLOCK_ASSERT(rnh) rm_assert(&(rnh)->rnh_lock, RA_WLOCKED) argument
/f-stack/freebsd/kern/
H A Dvfs_export.c181 rnh = NULL; in vfs_hang_addrlist()
200 if (rnh == NULL) { in vfs_hang_addrlist()
208 rn = (*rnh->rnh_addaddr)(saddr, smask, &rnh->rh, np->netc_rnodes); in vfs_hang_addrlist()
240 (*rnh->rnh_deladdr) (rn->rn_key, rn->rn_mask, &rnh->rh); in vfs_free_netcred()
265 rnh = *prnh; in vfs_free_addrlist_af()
267 (*rnh->rnh_walktree)(&rnh->rh, vfs_free_netcred, rnh); in vfs_free_addrlist_af()
479 rnh = NULL; in vfs_export_lookup()
482 rnh = nep->ne4; in vfs_export_lookup()
485 rnh = nep->ne6; in vfs_export_lookup()
488 if (rnh != NULL) { in vfs_export_lookup()
[all …]
/f-stack/freebsd/contrib/ipfilter/netinet/
H A Dradix_ipf.c1212 printroots(rnh) in printroots() argument
1217 rnh->nodes[0].index, GNAME(rnh->nodes[0].parent),
1218 GNAME(rnh->nodes[0].left), GNAME(rnh->nodes[0].right));
1221 rnh->nodes[1].index, GNAME(rnh->nodes[1].parent),
1222 GNAME(rnh->nodes[1].left), GNAME(rnh->nodes[1].right));
1225 rnh->nodes[2].index, GNAME(rnh->nodes[2].parent),
1226 GNAME(rnh->nodes[2].left), GNAME(rnh->nodes[2].right));
1239 rnh = NULL; in main()
1265 dumptree(rnh); in main()
1303 ipf_rx_walktree(rnh, ipf_rx_freenode, rnh); in main()
[all …]
/f-stack/freebsd/netinet6/
H A Din6_fib_algo.c90 struct radix_node_head *rnh; member
101 struct radix_node_head *rnh = (struct radix_node_head *)algo_data; in lradix6_lookup() local
109 ent = (struct radix6_addr_entry *)(rn_match(&addr6, &rnh->rh)); in lradix6_lookup()
136 if (lr == NULL || !rn_inithead((void **)&lr->rnh, OFF_LEN_INET6)) in lradix6_init()
160 if (lr->rnh != NULL) in lradix6_destroy()
161 rn_detachhead((void **)&lr->rnh); in lradix6_destroy()
200 rn = lr->rnh->rnh_addaddr((struct sockaddr *)&ae->addr, in lradix6_add_route_cb()
201 (struct sockaddr *)rt_mask, &lr->rnh->rh, ae->rn); in lradix6_add_route_cb()
214 dp->arg = lr->rnh; in lradix6_end_dump()
220 lradix6_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, in lradix6_change_cb() argument
[all …]
H A Dnd6.h390 void nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc,
/f-stack/lib/
H A Dff_route.c634 struct rib_head *rnh; in handle_rtm_get() local
641 if (rnh == NULL) in handle_rtm_get()
644 RIB_RLOCK(rnh); in handle_rtm_get()
667 RIB_RUNLOCK(rnh); in handle_rtm_get()
673 RIB_RUNLOCK(rnh); in handle_rtm_get()
704 &rnh->head); in handle_rtm_get()
706 RIB_RUNLOCK(rnh); in handle_rtm_get()
711 RIB_RUNLOCK(rnh); in handle_rtm_get()
717 RIB_RUNLOCK(rnh); in handle_rtm_get()
1404 if (rnh == NULL)
[all …]
/f-stack/freebsd/netinet/
H A Din_fib_algo.c480 bsearch4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, in bsearch4_change_cb() argument
519 struct radix_node_head *rnh; member
536 ent = (struct radix4_addr_entry *)(rn_match(&addr4, &rnh->rh)); in lradix4_lookup()
568 if (lr == NULL || !rn_inithead((void **)&lr->rnh, OFF_LEN_INET)) in lradix4_init()
592 if (lr->rnh != NULL) in lradix4_destroy()
593 rn_detachhead((void **)&lr->rnh); in lradix4_destroy()
630 rn = lr->rnh->rnh_addaddr((struct sockaddr *)&ae->addr, rt_mask, in lradix4_add_route_cb()
631 &lr->rnh->rh, ae->rn); in lradix4_add_route_cb()
644 dp->arg = lr->rnh; in lradix4_end_dump()
650 lradix4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, in lradix4_change_cb() argument
[all …]
/f-stack/freebsd/netpfil/ipfw/
H A Dip_fw_table_algo.c464 rnh->rnh_deladdr(rn->rn_key, rn->rn_mask, &rnh->rh); in flush_radix_entry()
479 rnh->rnh_walktree(&rnh->rh, flush_radix_entry, rnh); in ta_destroy_radix()
483 rnh->rnh_walktree(&rnh->rh, flush_radix_entry, rnh); in ta_destroy_radix()
552 e = rnh->rnh_matchaddr(&sa, &rnh->rh); in ta_find_radix_tentry()
558 e = rnh->rnh_matchaddr(&sa6, &rnh->rh); in ta_find_radix_tentry()
576 rnh->rnh_walktree(&rnh->rh, (walktree_f_t *)f, arg); in ta_foreach_radix()
579 rnh->rnh_walktree(&rnh->rh, (walktree_f_t *)f, arg); in ta_foreach_radix()
718 rnh = ti->state; in ta_add_radix()
726 rn = rnh->rnh_lookup(tb->addr_ptr, tb->mask_ptr, &rnh->rh); in ta_add_radix()
817 rnh = ti->state; in ta_del_radix()
[all …]
/f-stack/freebsd/contrib/dpdk_rte_lpm/
H A Ddpdk_lpm.c210 handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, in handle_rtable_change_cb() argument
/f-stack/tools/compat/include/netinet6/
H A Dnd6.h390 void nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc,

12