Lines Matching refs:kidx
177 get_table_value(struct ip_fw_chain *ch, struct table_config *tc, uint32_t kidx) in get_table_value() argument
183 return (&pval[kidx]); in get_table_value()
291 uint32_t kidx; in find_ref_table() local
325 error = create_table_compat(ch, ti, &kidx); in find_ref_table()
331 tc = (struct table_config *)ipfw_objhash_lookup_kidx(ni, kidx); in find_ref_table()
332 KASSERT(tc != NULL, ("create_table_compat returned bad idx %u", kidx)); in find_ref_table()
551 uint32_t kidx, num, numadd; in add_table_entry() local
628 kidx = tc->no.kidx; in add_table_entry()
629 error = check_table_space(ch, &ts, tc, KIDX_TO_TI(ch, kidx), count); in add_table_entry()
636 kidx = tc->no.kidx; in add_table_entry()
657 error = ta->add(tc->astate, KIDX_TO_TI(ch, kidx), in add_table_entry()
680 rollback_added_entries(ch, tc, KIDX_TO_TI(ch, kidx), in add_table_entry()
693 check_table_space(ch, NULL, tc, KIDX_TO_TI(ch, kidx), 0); in add_table_entry()
720 uint32_t kidx, num, numdel; in del_table_entry() local
757 kidx = tc->no.kidx; in del_table_entry()
766 error = ta->del(tc->astate, KIDX_TO_TI(ch, kidx), ptei, v, in del_table_entry()
782 check_table_space(ch, NULL, tc, KIDX_TO_TI(ch, kidx), 0); in del_table_entry()
867 ti = KIDX_TO_TI(ch, tc->no.kidx); in check_table_space()
913 uint32_t kidx; in manage_table_ent_v1() local
953 kidx = tent->idx; in manage_table_ent_v1()
957 if (ptent->idx != kidx) in manage_table_ent_v1()
964 ti.uidx = kidx; in manage_table_ent_v1()
1075 kti = KIDX_TO_TI(ch, tc->no.kidx); in find_table_entry()
1083 pval = get_table_value(ch, tc, tent->v.kidx); in find_table_entry()
1156 uint32_t kidx; in flush_table() local
1186 ta->print_config(tc->astate, KIDX_TO_TI(ch, tc->no.kidx), in flush_table()
1236 kidx = tc->no.kidx; in flush_table()
1240 ti_old = tablestate[kidx]; in flush_table()
1241 tablestate[kidx] = ti_new; in flush_table()
1251 ta->change_ti(tc->astate, &tablestate[kidx]); in flush_table()
1380 ti = tablestate[tc_a->no.kidx]; in swap_tables()
1387 tablestate[tc_a->no.kidx] = tablestate[tc_b->no.kidx]; in swap_tables()
1392 tablestate[tc_b->no.kidx] = ti; in swap_tables()
1399 tc_a->ti_copy = tablestate[tc_a->no.kidx]; in swap_tables()
1400 tc_b->ti_copy = tablestate[tc_b->no.kidx]; in swap_tables()
1404 tc_a->ta->change_ti(tc_a->astate, &tablestate[tc_a->no.kidx]); in swap_tables()
1406 tc_b->ta->change_ti(tc_b->astate, &tablestate[tc_b->no.kidx]); in swap_tables()
1445 if (ipfw_objhash_free_idx(ni, tc->no.kidx) != 0) in destroy_table()
1447 tc->no.kidx, tc->tablename); in destroy_table()
1541 ipfw_objhash_lookup_table_kidx(struct ip_fw_chain *ch, uint32_t kidx) in ipfw_objhash_lookup_table_kidx() argument
1544 return (ipfw_objhash_lookup_kidx(CHAIN_TO_NI(ch), kidx)); in ipfw_objhash_lookup_table_kidx()
1552 ipfw_ref_table(struct ip_fw_chain *ch, ipfw_obj_ntlv *ntlv, uint32_t *kidx) in ipfw_ref_table() argument
1569 *kidx = tc->no.kidx; in ipfw_ref_table()
1575 ipfw_unref_table(struct ip_fw_chain *ch, uint32_t kidx) in ipfw_unref_table() argument
1583 no = ipfw_objhash_lookup_kidx(ni, kidx); in ipfw_unref_table()
1584 KASSERT(no != NULL, ("Table with index %u not found", kidx)); in ipfw_unref_table()
1804 uint32_t kidx; in create_table_internal() local
1845 if (ipfw_objhash_alloc_idx(ni, &kidx) != 0) { in create_table_internal()
1852 tc->no.kidx = kidx; in create_table_internal()
1861 *pkidx = tc->no.kidx; in create_table_internal()
1904 ipfw_export_table_ntlv(struct ip_fw_chain *ch, uint32_t kidx, in ipfw_export_table_ntlv() argument
1913 no = ipfw_objhash_lookup_kidx(ni, kidx); in ipfw_export_table_ntlv()
1922 ntlv->idx = no->kidx; in ipfw_export_table_ntlv()
1967 ti = KIDX_TO_TI(ch, tc->no.kidx); in table_get_count()
1999 i->kidx = tc->no.kidx; in export_table_info()
2007 ti = KIDX_TO_TI(ch, tc->no.kidx); in export_table_info()
2132 da.ti = KIDX_TO_TI(ch, tc->no.kidx); in dump_table_v1()
2175 pval = get_table_value(da->ch, da->tc, tent->v.kidx); in dump_table_tentry()
2213 ipfw_foreach_table_tentry(struct ip_fw_chain *ch, uint32_t kidx, in ipfw_foreach_table_tentry() argument
2223 tc = (struct table_config *)ipfw_objhash_lookup_kidx(ni, kidx); in ipfw_foreach_table_tentry()
2231 da.ti = KIDX_TO_TI(ch, tc->no.kidx); in ipfw_foreach_table_tentry()
2429 *puidx = cmd->kidx; in classify_srcdst()
2465 *puidx = cmdif->p.kidx; /* XXXAE */ in classify_via()
2472 *puidx = insntod(cmd0, table)->kidx; in classify_flow()
2480 *puidx = insntod(cmd0, table)->kidx; in classify_mac_lookup()
2488 insntod(cmd0, table)->kidx = idx; in update_kidx()
2494 insntod(cmd0, if)->p.kidx = idx; in update_via()
2710 uint32_t kidx; in ipfw_switch_tables_namespace() local
2743 for (kidx = 0, rw = opcodes; in ipfw_switch_tables_namespace()
2747 if (rw->classifier(cmd, &kidx, &subtype) == 0) in ipfw_switch_tables_namespace()
2750 if (kidx == 0) in ipfw_switch_tables_namespace()
2752 no = ipfw_objhash_lookup_kidx(ni, kidx); in ipfw_switch_tables_namespace()
2918 uint16_t kidx; in link_table() local
2923 kidx = tc->no.kidx; in link_table()
2927 ti = KIDX_TO_TI(ch, kidx); in link_table()
2947 uint16_t kidx; in unlink_table() local
2953 kidx = tc->no.kidx; in unlink_table()
2957 ti = KIDX_TO_TI(ch, kidx); in unlink_table()
2988 if (ipfw_objhash_free_idx(ni, no->kidx) != 0) in destroy_table_locked()
2990 no->kidx, no->name); in destroy_table_locked()