FreeBSD/sys/netpfil/ipfw/ip_fw_table.c
/*
 * Unregisters table algo using @idx as id.
 * XXX: It is NOT safe to call this function in any place
 * other than ipfw instance destroy handler.
 */
Unregisters table algo using @idx as id.
XXX: It is NOT safe to call this function in any place
other than ipfw instance destroy handler.
Unregisters table algo using @idx as id . XXX : It is NOT safe to call this function in any place other than ipfw instance destroy handler .
void
ipfw_del_table_algo(struct ip_fw_chain *ch, int idx)
{
	struct tables_config *tcfg;
	struct table_algo *ta;
	tcfg = CHAIN_TO_TCFG(ch);
	KASSERT(idx <= tcfg->algo_count, ("algo idx %d out of range 1..%d",
	    idx, tcfg->algo_count));
	ta = tcfg->algo[idx];
	KASSERT(ta != NULL, ("algo idx %d is NULL", idx));
	if (tcfg->def_algo[ta->type] == ta)
		tcfg->def_algo[ta->type] = NULL;
	free(ta, M_IPFW);
}
void ipfw_del_table_algo ( struct ip_fw_chain * ch , int idx ) { struct tables_config * tcfg ; struct table_algo * ta ; tcfg = CHAIN_TO_TCFG ( ch ) ; KASSERT ( idx <= tcfg -> algo_count , ( " " , idx , tcfg -> algo_count ) ) ; ta = tcfg -> algo [ idx ] ; KASSERT ( ta != NULL , ( " " , idx ) ) ; if ( tcfg -> def_algo [ ta -> type ] == ta ) tcfg -> def_algo [ ta -> type ] = NULL ; free ( ta , M_IPFW ) ; }
Unregisters table algo using @idx as id.
Unregisters table algo using @idx as id .