Searched refs:rnh (Results 1 - 25 of 28) sorted by relevance

12

/freebsd-current/sys/net/route/
H A Droute_temporal.c77 * Per-rnh callout function traversing the tree and deleting
84 struct rib_head *rnh; local
88 rnh = (struct rib_head *)arg;
90 CURVNET_SET(rnh->rib_vnet);
93 rib_walk_del(rnh->rib_fibnum, rnh->rib_family, expire_route,
96 RIB_WLOCK(rnh);
101 callout_reset_sbt(&rnh->expire_callout, SBT_1S * seconds,
102 SBT_1MS * 500, expire_callout, rnh, 0);
103 rnh
124 tmproutes_update(struct rib_head *rnh, struct rtentry *rt, struct nhop_object *nh) argument
[all...]
H A Droute_subscription.c48 struct rib_head *rnh; member in struct:rib_subscription
56 rib_notify(struct rib_head *rnh, enum rib_subscription_type type, argument
61 CK_STAILQ_FOREACH(rs, &rnh->rnh_subscribers, next) {
63 rs->func(rnh, rc, rs->arg);
95 struct rib_head *rnh; local
100 rnh = rt_tables_get_rnh(fibnum, family);
103 return (rib_subscribe_internal(rnh, f, arg, type, waitok));
107 rib_subscribe_internal(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, argument
115 rs->rnh = rnh;
127 rib_subscribe_locked(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, enum rib_subscription_type type) argument
151 struct rib_head *rnh = rs->rnh; local
165 struct rib_head *rnh = rs->rnh; local
189 rib_init_subscriptions(struct rib_head *rnh) argument
196 rib_destroy_subscriptions(struct rib_head *rnh) argument
[all...]
H A Droute_ctl.c77 static int add_route_byinfo(struct rib_head *rnh, struct rt_addrinfo *info,
79 static int change_route_byinfo(struct rib_head *rnh, struct rtentry *rt,
83 static int add_route_flags(struct rib_head *rnh, struct rtentry *rt,
86 static int add_route_flags_mpath(struct rib_head *rnh, struct rtentry *rt,
91 static int add_route(struct rib_head *rnh, struct rtentry *rt,
93 static int delete_route(struct rib_head *rnh, struct rtentry *rt,
95 static int rt_delete_conditional(struct rib_head *rnh, struct rtentry *rt,
150 struct rib_head *rnh; local
156 rnh = rt_tables_get_rnh(fibnum, dst->sa_family);
158 return (rnh);
351 lookup_prefix_bysa(struct rib_head *rnh, const struct sockaddr *dst, const struct sockaddr *netmask, struct route_nhop_data *rnd) argument
371 lookup_prefix_rt(struct rib_head *rnh, const struct rtentry *rt, struct route_nhop_data *rnd) argument
384 lookup_prefix(struct rib_head *rnh, const struct rt_addrinfo *info, struct route_nhop_data *rnd) argument
396 rib_lookup_prefix_plen(struct rib_head *rnh, struct sockaddr *dst, int plen, struct route_nhop_data *rnd) argument
492 struct rib_head *rnh = rt_tables_get_rnh(fibnum, dst->sa_family); local
571 struct rib_head *rnh = rt_tables_get_rnh(fibnum, dst->sa_family); local
695 struct rib_head *rnh; local
726 add_route_byinfo(struct rib_head *rnh, struct rt_addrinfo *info, struct rib_cmd_info *rc) argument
784 add_route_flags(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data *rnd_add, int op_flags, struct rib_cmd_info *rc) argument
870 add_route_flags_mpath(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data *rnd_add, struct route_nhop_data *rnd_orig, int op_flags, struct rib_cmd_info *rc) argument
923 struct rib_head *rnh; local
1003 rt_delete_conditional(struct rib_head *rnh, struct rtentry *rt, int prio, rib_filter_f_t *cb, void *cbdata, struct rib_cmd_info *rc) argument
1043 struct rib_head *rnh; local
1100 change_nhop(struct rib_head *rnh, struct rt_addrinfo *info, struct nhop_object *nh_orig, struct nhop_object **nh_new) argument
1131 change_mpath_route(struct rib_head *rnh, struct rtentry *rt, struct rt_addrinfo *info, struct route_nhop_data *rnd_orig, struct rib_cmd_info *rc) argument
1183 change_route_byinfo(struct rib_head *rnh, struct rtentry *rt, struct rt_addrinfo *info, struct route_nhop_data *rnd_orig, struct rib_cmd_info *rc) argument
1214 add_route(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data *rnd, struct rib_cmd_info *rc) argument
1251 delete_route(struct rib_head *rnh, struct rtentry *rt, struct rib_cmd_info *rc) argument
1283 change_route(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data *rnd, struct rib_cmd_info *rc) argument
1320 change_route_conditional(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data *rnd_orig, struct route_nhop_data *rnd_new, struct rib_cmd_info *rc) argument
1415 struct rib_head *rnh; member in struct:rt_delinfo
1474 struct rib_head *rnh; local
1533 struct rib_head *rnh = (struct rib_head *)arg; local
1547 rib_flush_routes(struct rib_head *rnh) argument
1557 struct rib_head *rnh; local
[all...]
H A Droute_var.h118 rib_bump_gen(struct rib_head *rnh) argument
121 rnh->rnh_gen_rib++;
123 rnh->rnh_gen++;
207 void tmproutes_update(struct rib_head *rnh, struct rtentry *rt, struct nhop_object *nh);
213 int change_route(struct rib_head *rnh, struct rtentry *rt,
215 int change_route_conditional(struct rib_head *rnh, struct rtentry *rt,
218 struct rtentry *lookup_prefix(struct rib_head *rnh,
220 struct rtentry *lookup_prefix_rt(struct rib_head *rnh, const struct rtentry *rt,
236 struct rtentry *rt_alloc(struct rib_head *rnh, const struct sockaddr *dst,
240 void rib_init_subscriptions(struct rib_head *rnh);
[all...]
H A Droute_helpers.c76 rib_walk_ext_locked(struct rib_head *rnh, rib_walktree_f_t *wa_f, argument
80 hook_f(rnh, RIB_WALK_HOOK_PRE, arg);
81 rnh->rnh_walktree(&rnh->head, (walktree_f_t *)wa_f, arg);
83 hook_f(rnh, RIB_WALK_HOOK_POST, arg);
96 rib_walk_ext_internal(struct rib_head *rnh, bool wlock, rib_walktree_f_t *wa_f, argument
102 RIB_WLOCK(rnh);
104 RIB_RLOCK(rnh);
105 rib_walk_ext_locked(rnh, wa_f, hook_f, arg);
107 RIB_WUNLOCK(rnh);
116 struct rib_head *rnh; local
150 struct rib_head *rnh = rt_tables_get_rnh(fibnum, family); local
[all...]
H A Droute_ctl.h94 #define RIB_FLAG_WLOCK 0x01 /* Need exclusive rnh lock */
95 #define RIB_FLAG_LOCKED 0x02 /* Do not explicitly acquire rnh lock */
102 typedef void rib_walk_hook_f_t(struct rib_head *rnh, enum rib_walk_hook stage,
108 void rib_walk_ext_internal(struct rib_head *rnh, bool wlock,
110 void rib_walk_ext_locked(struct rib_head *rnh, rib_walktree_f_t *wa_f,
127 rib_lookup_prefix_plen(struct rib_head *rnh, struct sockaddr *dst, int plen,
189 typedef void rib_subscription_cb_t(struct rib_head *rnh, struct rib_cmd_info *rc,
195 struct rib_subscription *rib_subscribe_internal(struct rib_head *rnh,
198 struct rib_subscription *rib_subscribe_locked(struct rib_head *rnh,
202 void rib_notify(struct rib_head *rnh, enu
[all...]
H A Droute_tables.c328 struct rib_head *rnh; local
338 rnh = rt_tables_get_rnh(i, family);
339 dom->dom_rtdetach(rnh);
375 /* rnh is [fib=0][af=0]. */
403 struct rib_head *rnh; local
405 rnh = rt_tables_get_rnh_ptr(table, family);
406 KASSERT(rnh != NULL, ("%s: NULL rib_head pointer table %d family %d",
408 return (rnh->rnh_gen);
H A Dnhop_ctl.c256 nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo *info, argument
267 FIB_RH_LOG(LOG_DEBUG, rnh, "error: empty gateway");
271 struct nhop_object *nh = nhop_alloc(rnh->rib_fibnum, rnh->rib_family);
283 error = rnh->rnh_set_nh_pfxflags(rnh->rib_fibnum, info->rti_info[RTAX_DST],
315 struct rib_head *rnh = nhop_get_rh(nh); local
317 if (__predict_false(rnh == NULL)) {
323 return (nhop_get_nhop_internal(rnh, nh, perror));
327 nhop_get_nhop_internal(struct rib_head *rnh, struc argument
371 struct rib_head *rnh = nhop_get_rh(nh); local
436 nhop_create_from_nhop(struct rib_head *rnh, const struct nhop_object *nh_orig, struct rt_addrinfo *info, struct nhop_object **pnh) argument
[all...]
H A Droute_ddb.c170 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 Dfib_algo.h78 typedef enum flm_op_result flm_change_t(struct rib_head *rnh,
80 typedef enum flm_op_result flm_change_batch_t(struct rib_head *rnh,
H A Droute_rtentry.c82 rt_alloc(struct rib_head *rnh, const struct sockaddr *dst, argument
111 * At this moment rnh, nh_control may be already freed.
H A Dfib_algo.c772 handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, argument
778 RIB_WLOCK_ASSERT(rnh);
831 result = fd->fd_flm->flm_change_rib_item_cb(rnh, rc, fd->fd_algo_data);
916 sync_algo_end_cb(struct rib_head *rnh, enum rib_walk_hook stage, void *_data) argument
923 if (rnh->rib_dying) {
1085 * rnh has `is_dying` flag set, so setup of new fd's will fail at
/freebsd-current/sys/net/
H A Dradix.h161 #define RADIX_NODE_HEAD_LOCK_INIT(rnh) \
162 rm_init(&(rnh)->rnh_lock, "radix node head")
163 #define RADIX_NODE_HEAD_LOCK(rnh) rm_wlock(&(rnh)->rnh_lock)
164 #define RADIX_NODE_HEAD_UNLOCK(rnh) rm_wunlock(&(rnh)->rnh_lock)
165 #define RADIX_NODE_HEAD_RLOCK(rnh) rm_rlock(&(rnh)->rnh_lock,\
167 #define RADIX_NODE_HEAD_RUNLOCK(rnh) rm_runlock(&(rnh)
[all...]
H A Dradix.c1137 struct radix_node_head *rnh; local
1140 rnh = *head;
1146 R_Zalloc(rnh, struct radix_node_head *, sizeof (*rnh));
1148 if (rnh == NULL || rmh == NULL) {
1149 if (rnh != NULL)
1150 R_Free(rnh);
1157 rn_inithead_internal(&rnh->rh, rnh->rnh_nodes, off);
1159 *head = rnh;
1176 struct radix_head * const rnh = arg; local
1188 struct radix_node_head *rnh; local
[all...]
H A Droute.c139 struct radix_head * const rnh = arg; local
142 x = (struct radix_node *)rn_delete(rn + 2, NULL, rnh);
320 * Called for each routing entry via the rnh->rnh_walktree() call above
326 * arg argument passed to rnh->rnh_walktree() - detaching interface
510 struct rib_head *rnh; local
522 rnh = rt_tables_get_rnh(j, i);
523 if (rnh == NULL)
525 nhops_update_ifmtu(rnh, ifp, mtu);
H A Drtsock.c746 struct rib_head *rnh; local
752 rnh = rt_tables_get_rnh(fibnum, saf);
753 if (rnh == NULL)
756 RIB_RLOCK(rnh);
771 rc->rc_rt = (struct rtentry *) rnh->rnh_matchaddr(
772 info->rti_info[RTAX_DST], &rnh->head);
774 rc->rc_rt = (struct rtentry *) rnh->rnh_lookup(
776 info->rti_info[RTAX_NETMASK], &rnh->head);
779 RIB_RUNLOCK(rnh);
785 RIB_RUNLOCK(rnh);
2566 struct rib_head *rnh = NULL; /* silence compiler. */ local
[all...]
/freebsd-current/sys/netpfil/ipfilter/netinet/
H A Dradix_ipf.c998 void delete_addr(ipf_rdx_head_t *rnh, int item);
999 void dumptree(ipf_rdx_head_t *rnh);
1004 void test_addr(ipf_rdx_head_t *rnh, int pref, addrfamily_t *, int);
1174 printroots(ipf_rdx_head_t *rnh) argument
1177 GNAME(&rnh->nodes[0]),
1178 rnh->nodes[0].index, GNAME(rnh->nodes[0].parent),
1179 GNAME(rnh->nodes[0].left), GNAME(rnh->nodes[0].right));
1181 GNAME(&rnh
1195 ipf_rdx_head_t *rnh; local
1271 dumptree(ipf_rdx_head_t *rnh) argument
1284 test_addr(ipf_rdx_head_t *rnh, int pref, addrfamily_t *addr, int limit) argument
1322 delete_addr(ipf_rdx_head_t *rnh, int item) argument
1364 add_addr(ipf_rdx_head_t *rnh, int n, int item) argument
1452 random_add(ipf_rdx_head_t *rnh) argument
1470 random_delete(ipf_rdx_head_t *rnh) argument
[all...]
/freebsd-current/sys/kern/
H A Dvfs_export.c105 struct radix_node_head *rnh; local
177 rnh = NULL;
181 if ((rnh = nep->ne4) == NULL) {
183 rnh = vfs_create_addrlist_af(&nep->ne4, off);
189 if ((rnh = nep->ne6) == NULL) {
191 rnh = vfs_create_addrlist_af(&nep->ne6, off);
196 if (rnh == NULL) {
203 RADIX_NODE_HEAD_LOCK(rnh);
204 rn = (*rnh->rnh_addaddr)(saddr, smask, &rnh
233 struct radix_node_head *rnh = (struct radix_node_head *) w; local
259 struct radix_node_head *rnh; local
618 struct radix_node_head *rnh; local
[all...]
/freebsd-current/sys/netinet6/
H A Din6_fib_algo.c89 struct radix_node_head *rnh; member in struct:lradix6_data
100 struct radix_node_head *rnh = (struct radix_node_head *)algo_data; local
108 ent = (struct radix6_addr_entry *)(rn_match(&addr6, &rnh->rh));
135 if (lr == NULL || !rn_inithead((void **)&lr->rnh, OFF_LEN_INET6))
159 if (lr->rnh != NULL)
160 rn_detachhead((void **)&lr->rnh);
199 rn = lr->rnh->rnh_addaddr((struct sockaddr *)&ae->addr,
200 (struct sockaddr *)rt_mask, &lr->rnh->rh, ae->rn);
213 dp->arg = lr->rnh;
219 lradix6_change_cb(struct rib_head *rnh, struc argument
335 radix6_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *_data) argument
[all...]
H A Dnd6.h376 void nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc,
/freebsd-current/sys/netinet/
H A Din_fib_algo.c479 bsearch4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, argument
518 struct radix_node_head *rnh; member in struct:lradix4_data
529 struct radix_node_head *rnh = (struct radix_node_head *)algo_data; local
535 ent = (struct radix4_addr_entry *)(rn_match(&addr4, &rnh->rh));
567 if (lr == NULL || !rn_inithead((void **)&lr->rnh, OFF_LEN_INET))
591 if (lr->rnh != NULL)
592 rn_detachhead((void **)&lr->rnh);
629 rn = lr->rnh->rnh_addaddr((struct sockaddr *)&ae->addr, rt_mask,
630 &lr->rnh->rh, ae->rn);
643 dp->arg = lr->rnh;
649 lradix4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *_data) argument
751 radix4_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *_data) argument
[all...]
/freebsd-current/sys/netpfil/ipfw/
H A Dip_fw_table_algo.c414 struct radix_node_head *rnh; local
421 rnh = (struct radix_node_head *)ti->state;
422 ent = (struct addr_radix_entry *)(rnh->rnh_matchaddr(&sa, &rnh->rh));
432 rnh = (struct radix_node_head *)ti->xstate;
433 xent = (struct addr_radix_xentry *)(rnh->rnh_matchaddr(&sa6, &rnh->rh));
470 struct radix_node_head * const rnh = arg; local
474 rnh->rnh_deladdr(rn->rn_key, rn->rn_mask, &rnh
484 struct radix_node_head *rnh; local
553 struct radix_node_head *rnh; local
583 struct radix_node_head *rnh; local
718 struct radix_node_head *rnh; local
819 struct radix_node_head *rnh; local
4035 struct radix_node_head *rnh; local
4073 struct radix_node_head *rnh; local
4156 struct radix_node_head *rnh; local
4238 struct radix_node_head *rnh; local
4265 struct radix_node_head *rnh; local
4302 struct radix_node_head *rnh; local
[all...]
/freebsd-current/sbin/routed/
H A Dradix.c844 struct radix_node_head *rnh; local
848 rnh = (struct radix_node_head *)rtmalloc(sizeof(*rnh), "rn_inithead");
849 Bzero(rnh, sizeof (*rnh));
850 *head = rnh;
851 t = rn_newpair(rn_zeros, off, rnh->rnh_nodes);
852 ttt = rnh->rnh_nodes + 2;
860 rnh->rnh_addaddr = rn_addroute;
861 rnh
[all...]
/freebsd-current/sys/netlink/route/
H A Drt.c611 struct rib_head *rnh; local
622 rnh = rt_tables_get_rnh(fibnum, family);
623 if (rnh == NULL)
626 RIB_RLOCK(rnh);
631 rt = rib_lookup_prefix_plen(rnh, dst, attrs->rtm_dst_len, &rnd);
633 rt = (const struct rtentry *)rnh->rnh_matchaddr(dst, &rnh->head);
635 RIB_RUNLOCK(rnh);
642 RIB_RUNLOCK(rnh);
/freebsd-current/sys/contrib/dpdk_rte_lpm/
H A Ddpdk_lpm6.c270 handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, argument

Completed in 307 milliseconds

12