sys/netpfil/ipfw/ip_fw_sockopt.c
/*
 * Clear counters for a specific rule.
 * Normally run under IPFW_UH_RLOCK, but these are idempotent ops
 * so we only care that rules do not disappear.
 */
Clear counters for a specific rule.
Normally run under IPFW_UH_RLOCK, but these are idempotent ops
so we only care that rules do not disappear.
Clear counters for a specific rule . Normally run under IPFW_UH_RLOCK but these are idempotent ops so we only care that rules do not disappear .
static void
clear_counters(struct ip_fw *rule, int log_only)
{
	ipfw_insn_log *l = (ipfw_insn_log *)ACTION_PTR(rule);
	if (log_only == 0)
		IPFW_ZERO_RULE_COUNTER(rule);
	if (l->o.opcode == O_LOG)
		l->log_left = l->max_log;
}
static void clear_counters ( struct ip_fw * rule , int log_only ) { ipfw_insn_log * l = ( ipfw_insn_log * ) ACTION_PTR ( rule ) ; if ( log_only == 0 ) IPFW_ZERO_RULE_COUNTER ( rule ) ; if ( l -> o . opcode == O_LOG ) l -> log_left = l -> max_log ; }
Clear counters for a specific rule.
Clear counters for a specific rule .