Lines Matching refs:lr
129 struct lradix6_data *lr; in lradix6_init() local
134 lr = malloc(sizeof(struct lradix6_data), M_RTABLE, M_NOWAIT | M_ZERO); in lradix6_init()
135 if (lr == NULL || !rn_inithead((void **)&lr->rnh, OFF_LEN_INET6)) in lradix6_init()
144 lr->mem = mem; in lradix6_init()
145 lr->radix_mem = (void *)roundup2((uintptr_t)mem, CACHE_LINE_SIZE); in lradix6_init()
146 lr->alloc_items = count; in lradix6_init()
147 lr->fd = fd; in lradix6_init()
149 *_data = lr; in lradix6_init()
157 struct lradix6_data *lr = (struct lradix6_data *)_data; in lradix6_destroy() local
159 if (lr->rnh != NULL) in lradix6_destroy()
160 rn_detachhead((void **)&lr->rnh); in lradix6_destroy()
161 if (lr->mem != NULL) in lradix6_destroy()
162 free(lr->mem, M_RTABLE); in lradix6_destroy()
163 free(lr, M_RTABLE); in lradix6_destroy()
169 struct lradix6_data *lr = (struct lradix6_data *)_data; in lradix6_add_route_cb() local
178 if (lr->num_items >= lr->alloc_items) in lradix6_add_route_cb()
181 ae = (struct radix6_addr_entry *)((char *)lr->radix_mem + lr->num_items * LRADIX6_ITEM_SZ); in lradix6_add_route_cb()
182 lr->num_items++; in lradix6_add_route_cb()
199 rn = lr->rnh->rnh_addaddr((struct sockaddr *)&ae->addr, in lradix6_add_route_cb()
200 (struct sockaddr *)rt_mask, &lr->rnh->rh, ae->rn); in lradix6_add_route_cb()
210 struct lradix6_data *lr = (struct lradix6_data *)_data; in lradix6_end_dump() local
213 dp->arg = lr->rnh; in lradix6_end_dump()