Lines Matching full:rh

102 	struct rib_head *rh;  in rt_table_init()  local
104 rh = malloc(sizeof(struct rib_head), M_RTABLE, M_WAITOK | M_ZERO); in rt_table_init()
108 rn_inithead_internal(&rh->head, rh->rnh_nodes, offset); in rt_table_init()
109 rn_inithead_internal(&rh->rmhead.head, rh->rmhead.mask_nodes, 0); in rt_table_init()
110 rh->head.rnh_masks = &rh->rmhead; in rt_table_init()
113 rh->rib_family = family; in rt_table_init()
114 rh->rib_fibnum = fibnum; in rt_table_init()
116 rh->rib_vnet = curvnet; in rt_table_init()
119 tmproutes_init(rh); in rt_table_init()
122 RIB_LOCK_INIT(rh); in rt_table_init()
124 nhops_init_rib(rh); in rt_table_init()
127 rib_init_subscriptions(rh); in rt_table_init()
130 rh->rnh_addaddr = rn_addroute; in rt_table_init()
131 rh->rnh_deladdr = rn_delete; in rt_table_init()
132 rh->rnh_matchaddr = rn_match; in rt_table_init()
133 rh->rnh_lookup = rn_lookup; in rt_table_init()
134 rh->rnh_walktree = rn_walktree; in rt_table_init()
135 rh->rnh_walktree_from = rn_walktree_from; in rt_table_init()
137 return (rh); in rt_table_init()
153 rt_table_destroy(struct rib_head *rh) in rt_table_destroy() argument
156 RIB_WLOCK(rh); in rt_table_destroy()
157 rh->rib_dying = true; in rt_table_destroy()
158 RIB_WUNLOCK(rh); in rt_table_destroy()
161 fib_destroy_rib(rh); in rt_table_destroy()
164 tmproutes_destroy(rh); in rt_table_destroy()
166 rn_walktree(&rh->rmhead.head, rt_freeentry, &rh->rmhead.head); in rt_table_destroy()
168 nhops_destroy_rib(rh); in rt_table_destroy()
170 rib_destroy_subscriptions(rh); in rt_table_destroy()
173 RIB_LOCK_DESTROY(rh); in rt_table_destroy()
174 free(rh, M_RTABLE); in rt_table_destroy()