• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/netpfil/ipfw/

Lines Matching defs:kidx

181 get_table_value(struct ip_fw_chain *ch, struct table_config *tc, uint32_t kidx)
187 return (&pval[kidx]);
256 * Saves table config, algo and allocated kidx info @ptc, @pta and
296 uint16_t kidx;
330 error = create_table_compat(ch, ti, &kidx);
336 tc = (struct table_config *)ipfw_objhash_lookup_kidx(ni, kidx);
337 KASSERT(tc != NULL, ("create_table_compat returned bad idx %d", kidx));
555 uint16_t kidx;
637 kidx = tc->no.kidx;
638 error = check_table_space(ch, &ts, tc, KIDX_TO_TI(ch, kidx), count);
645 kidx = tc->no.kidx;
658 error = ta->add(tc->astate, KIDX_TO_TI(ch, kidx),
681 rollback_added_entries(ch, tc, KIDX_TO_TI(ch, kidx),
694 check_table_space(ch, NULL, tc, KIDX_TO_TI(ch, kidx), 0);
719 uint16_t kidx;
759 kidx = tc->no.kidx;
768 error = ta->del(tc->astate, KIDX_TO_TI(ch, kidx), ptei, v,
784 check_table_space(ch, NULL, tc, KIDX_TO_TI(ch, kidx), 0);
870 ti = KIDX_TO_TI(ch, tc->no.kidx);
971 int error, i, kidx, read;
1010 kidx = tent->idx;
1014 if (ptent->idx != kidx)
1021 ti.uidx = kidx;
1132 kti = KIDX_TO_TI(ch, tc->no.kidx);
1140 pval = get_table_value(ch, tc, tent->v.kidx);
1213 uint16_t kidx;
1243 ta->print_config(tc->astate, KIDX_TO_TI(ch, tc->no.kidx),
1293 kidx = tc->no.kidx;
1297 ti_old = tablestate[kidx];
1298 tablestate[kidx] = ti_new;
1308 ta->change_ti(tc->astate, &tablestate[kidx]);
1359 * @tc (with name, set, kidx) and rule bindings, which is "stable".
1437 ti = tablestate[tc_a->no.kidx];
1444 tablestate[tc_a->no.kidx] = tablestate[tc_b->no.kidx];
1449 tablestate[tc_b->no.kidx] = ti;
1456 tc_a->ti_copy = tablestate[tc_a->no.kidx];
1457 tc_b->ti_copy = tablestate[tc_b->no.kidx];
1461 tc_a->ta->change_ti(tc_a->astate, &tablestate[tc_a->no.kidx]);
1463 tc_b->ta->change_ti(tc_b->astate, &tablestate[tc_b->no.kidx]);
1502 if (ipfw_objhash_free_idx(ni, tc->no.kidx) != 0)
1503 printf("Error unlinking kidx %d from table %s\n",
1504 tc->no.kidx, tc->tablename);
1612 * Lookup table's named object by its @kidx.
1615 ipfw_objhash_lookup_table_kidx(struct ip_fw_chain *ch, uint16_t kidx)
1618 return (ipfw_objhash_lookup_kidx(CHAIN_TO_NI(ch), kidx));
1623 * On success return its @kidx.
1626 ipfw_ref_table(struct ip_fw_chain *ch, ipfw_obj_ntlv *ntlv, uint16_t *kidx)
1643 *kidx = tc->no.kidx;
1649 ipfw_unref_table(struct ip_fw_chain *ch, uint16_t kidx)
1657 no = ipfw_objhash_lookup_kidx(ni, kidx);
1658 KASSERT(no != NULL, ("Table with index %d not found", kidx));
1866 * Stores allocated table kidx inside @pkidx (if non-NULL).
1878 uint16_t kidx;
1920 if (ipfw_objhash_alloc_idx(ni, &kidx) != 0) {
1927 tc->no.kidx = kidx;
1936 *pkidx = tc->no.kidx;
1979 ipfw_export_table_ntlv(struct ip_fw_chain *ch, uint16_t kidx,
1988 no = ipfw_objhash_lookup_kidx(ni, kidx);
1989 KASSERT(no != NULL, ("invalid table kidx passed"));
1997 ntlv->idx = no->kidx;
2043 ti = KIDX_TO_TI(ch, tc->no.kidx);
2075 i->kidx = tc->no.kidx;
2083 ti = KIDX_TO_TI(ch, tc->no.kidx);
2209 da.ti = KIDX_TO_TI(ch, tc->no.kidx);
2275 da.ti = KIDX_TO_TI(ch, tc->no.kidx);
2376 pval = get_table_value(da->ch, da->tc, da->tent.v.kidx);
2406 da.ti = KIDX_TO_TI(ch, tc->no.kidx);
2449 pval = get_table_value(da->ch, da->tc, tent->v.kidx);
2489 pval = get_table_value(da->ch, da->tc, da->tent.v.kidx);
2533 ipfw_foreach_table_tentry(struct ip_fw_chain *ch, uint16_t kidx,
2543 tc = (struct table_config *)ipfw_objhash_lookup_kidx(ni, kidx);
2551 da.ti = KIDX_TO_TI(ch, tc->no.kidx);
2796 *puidx = cmdif->p.kidx;
2824 cmdif->p.kidx = idx;
3020 uint16_t kidx;
3053 for (kidx = 0, rw = opcodes;
3057 if (rw->classifier(cmd, &kidx, &subtype) == 0)
3060 if (kidx == 0)
3062 no = ipfw_objhash_lookup_kidx(ni, kidx);
3229 uint16_t kidx;
3234 kidx = tc->no.kidx;
3238 ti = KIDX_TO_TI(ch, kidx);
3258 uint16_t kidx;
3264 kidx = tc->no.kidx;
3268 ti = KIDX_TO_TI(ch, kidx);
3303 if (ipfw_objhash_free_idx(ni, no->kidx) != 0)
3304 printf("Error unlinking kidx %d from table %s\n",
3305 no->kidx, no->name);