FreeBSD/sys/netpfil/ipfw/ip_fw_table.c
/*
 * Unlinks @tc from @chain table named instance.
 * Zeroes states in @chain and stores them in @tc.
 */
Unlinks @tc from @chain table named instance.
Zeroes states in @chain and stores them in @tc.
Unlinks @tc from @chain table named instance . Zeroes states in @chain and stores them in @tc .
static void
unlink_table(struct ip_fw_chain *ch, struct table_config *tc)
{
	struct namedobj_instance *ni;
	struct table_info *ti;
	uint16_t kidx;
	IPFW_UH_WLOCK_ASSERT(ch);
	IPFW_WLOCK_ASSERT(ch);
	ni = CHAIN_TO_NI(ch);
	kidx = tc->no.kidx;
	ipfw_objhash_del(ni, &tc->no);
	ti = KIDX_TO_TI(ch, kidx);
	memset(ti, 0, sizeof(struct table_info));
	tc->linked = 0;
	tc->ta->refcnt--;
	if (tc->ta->change_ti != NULL)
		tc->ta->change_ti(tc->astate, NULL);
}
static void unlink_table ( struct ip_fw_chain * ch , struct table_config * tc ) { struct namedobj_instance * ni ; struct table_info * ti ; uint16_t kidx ; IPFW_UH_WLOCK_ASSERT ( ch ) ; IPFW_WLOCK_ASSERT ( ch ) ; ni = CHAIN_TO_NI ( ch ) ; kidx = tc -> no . kidx ; ipfw_objhash_del ( ni , & tc -> no ) ; ti = KIDX_TO_TI ( ch , kidx ) ; memset ( ti , 0 , sizeof ( struct table_info ) ) ; tc -> linked = 0 ; tc -> ta -> refcnt -- ; if ( tc -> ta -> change_ti != NULL ) tc -> ta -> change_ti ( tc -> astate , NULL ) ; }
Unlinks @tc from @chain table named instance.
Unlinks @tc from @chain table named instance .
/* Clear state. @ti copy is already saved inside @tc */ /* Notify algo on real @ti address */