FreeBSD/sys/netpfil/ipfw/ip_fw_eaction.c
/*
 * Deregisters external action handler with id eaction_id.
 */
Deregisters external action handler with id eaction_id.
Deregisters external action handler with id eaction_id .
int
ipfw_del_eaction(struct ip_fw_chain *ch, uint16_t eaction_id)
{
	struct named_object *no;
	IPFW_UH_WLOCK(ch);
	no = ipfw_objhash_lookup_kidx(CHAIN_TO_SRV(ch), eaction_id);
	if (no == NULL || no->etlv != IPFW_TLV_EACTION) {
		IPFW_UH_WUNLOCK(ch);
		return (EINVAL);
	}
	if (no->refcnt > 1)
		reset_eaction_obj(ch, eaction_id);
	EACTION_DEBUG("External action '%s' with id %u unregistered",
	    no->name, eaction_id);
	destroy_eaction_obj(ch, no);
	IPFW_UH_WUNLOCK(ch);
	return (0);
}
int ipfw_del_eaction ( struct ip_fw_chain * ch , uint16_t eaction_id ) { struct named_object * no ; IPFW_UH_WLOCK ( ch ) ; no = ipfw_objhash_lookup_kidx ( CHAIN_TO_SRV ( ch ) , eaction_id ) ; if ( no == NULL || no -> etlv != IPFW_TLV_EACTION ) { IPFW_UH_WUNLOCK ( ch ) ; return ( EINVAL ) ; } if ( no -> refcnt > 1 ) reset_eaction_obj ( ch , eaction_id ) ; EACTION_DEBUG ( " " , no -> name , eaction_id ) ; destroy_eaction_obj ( ch , no ) ; IPFW_UH_WUNLOCK ( ch ) ; return ( 0 ) ; }
Deregisters external action handler with id eaction_id.
Deregisters external action handler with id eaction_id .