Lines Matching refs:icfg
1921 struct iftable_cfg *icfg; member
2105 struct iftable_cfg *icfg; in ta_init_ifidx() local
2107 icfg = malloc(sizeof(struct iftable_cfg), M_IPFW, M_WAITOK | M_ZERO); in ta_init_ifidx()
2109 icfg->ii = ipfw_objhash_create(DEFAULT_IFIDX_SIZE, DEFAULT_OBJHASH_SIZE); in ta_init_ifidx()
2110 icfg->size = DEFAULT_IFIDX_SIZE; in ta_init_ifidx()
2111 icfg->main_ptr = malloc(sizeof(struct ifidx) * icfg->size, M_IPFW, in ta_init_ifidx()
2113 icfg->ch = ch; in ta_init_ifidx()
2115 *ta_state = icfg; in ta_init_ifidx()
2116 ti->state = icfg->main_ptr; in ta_init_ifidx()
2128 struct iftable_cfg *icfg; in ta_change_ti_ifidx() local
2130 icfg = (struct iftable_cfg *)ta_state; in ta_change_ti_ifidx()
2131 icfg->ti = ti; in ta_change_ti_ifidx()
2156 struct iftable_cfg *icfg; in ta_destroy_ifidx() local
2159 icfg = (struct iftable_cfg *)ta_state; in ta_destroy_ifidx()
2160 ch = icfg->ch; in ta_destroy_ifidx()
2162 if (icfg->main_ptr != NULL) in ta_destroy_ifidx()
2163 free(icfg->main_ptr, M_IPFW); in ta_destroy_ifidx()
2166 ipfw_objhash_foreach(icfg->ii, destroy_ifidx_locked, ch); in ta_destroy_ifidx()
2169 ipfw_objhash_destroy(icfg->ii); in ta_destroy_ifidx()
2171 free(icfg, M_IPFW); in ta_destroy_ifidx()
2230 struct iftable_cfg *icfg; in ta_add_ifidx() local
2240 icfg = (struct iftable_cfg *)ta_state; in ta_add_ifidx()
2243 ife->icfg = icfg; in ta_add_ifidx()
2246 tmp = (struct ifentry *)ipfw_objhash_lookup_name(icfg->ii, 0, ifname); in ta_add_ifidx()
2274 ipfw_objhash_add(icfg->ii, &ife->no); in ta_add_ifidx()
2277 ipfw_iface_add_notify(icfg->ch, &ife->ic); in ta_add_ifidx()
2278 icfg->count++; in ta_add_ifidx()
2312 struct iftable_cfg *icfg; in ta_del_ifidx() local
2321 icfg = (struct iftable_cfg *)ta_state; in ta_del_ifidx()
2323 ife = (struct ifentry *)ipfw_objhash_lookup_name(icfg->ii, 0, ifname); in ta_del_ifidx()
2332 res = bdel(&ifindex, icfg->main_ptr, icfg->used, in ta_del_ifidx()
2336 icfg->used--; in ta_del_ifidx()
2337 ti->data = icfg->used; in ta_del_ifidx()
2342 ipfw_objhash_del(icfg->ii, &ife->no); in ta_del_ifidx()
2344 ipfw_iface_del_notify(icfg->ch, &ife->ic); in ta_del_ifidx()
2345 ipfw_iface_unref(icfg->ch, &ife->ic); in ta_del_ifidx()
2347 icfg->count--; in ta_del_ifidx()
2381 struct iftable_cfg *icfg; in if_notifier() local
2386 icfg = ife->icfg; in if_notifier()
2387 ti = icfg->ti; in if_notifier()
2396 res = badd(&ifindex, &ifi, icfg->main_ptr, icfg->used, in if_notifier()
2399 icfg->used++; in if_notifier()
2400 ti->data = icfg->used; in if_notifier()
2406 res = bdel(&ifindex, icfg->main_ptr, icfg->used, in if_notifier()
2410 icfg->used--; in if_notifier()
2411 ti->data = icfg->used; in if_notifier()
2467 struct iftable_cfg *icfg; in ta_fill_mod_ifidx() local
2470 icfg = (struct iftable_cfg *)ta_state; in ta_fill_mod_ifidx()
2473 if (icfg->size >= mi->size) { in ta_fill_mod_ifidx()
2478 memcpy(mi->main_ptr, icfg->main_ptr, icfg->used * sizeof(struct ifidx)); in ta_fill_mod_ifidx()
2491 struct iftable_cfg *icfg; in ta_modify_ifidx() local
2495 icfg = (struct iftable_cfg *)ta_state; in ta_modify_ifidx()
2497 old_ptr = icfg->main_ptr; in ta_modify_ifidx()
2498 icfg->main_ptr = mi->main_ptr; in ta_modify_ifidx()
2499 icfg->size = mi->size; in ta_modify_ifidx()
2500 ti->state = icfg->main_ptr; in ta_modify_ifidx()
2537 struct iftable_cfg *icfg; in ta_find_ifidx_tentry() local
2541 icfg = (struct iftable_cfg *)ta_state; in ta_find_ifidx_tentry()
2547 ife = (struct ifentry *)ipfw_objhash_lookup_name(icfg->ii, 0, ifname); in ta_find_ifidx_tentry()
2580 struct iftable_cfg *icfg; in ta_foreach_ifidx() local
2583 icfg = (struct iftable_cfg *)ta_state; in ta_foreach_ifidx()
2588 ipfw_objhash_foreach(icfg->ii, foreach_ifidx, &wa); in ta_foreach_ifidx()