FreeBSD/sys/netpfil/ipfw/ip_fw2.c
/*
 * Helper function to enable real fast rule lookups.
 */
Helper function to enable real fast rule lookups.
Helper function to enable real fast rule lookups .
static int
jump_linear(struct ip_fw_chain *chain, struct ip_fw *f, int num,
    int tablearg, int jump_backwards)
{
	int f_pos;
	num = IP_FW_ARG_TABLEARG(chain, num, skipto);
	if (jump_backwards == 0 && num <= f->rulenum)
		num = f->rulenum + 1;
	f_pos = chain->idxmap[num];
	return (f_pos);
}
static int jump_linear ( struct ip_fw_chain * chain , struct ip_fw * f , int num , int tablearg , int jump_backwards ) { int f_pos ; num = IP_FW_ARG_TABLEARG ( chain , num , skipto ) ; if ( jump_backwards == 0 && num <= f -> rulenum ) num = f -> rulenum + 1 ; f_pos = chain -> idxmap [ num ] ; return ( f_pos ) ; }
Helper function to enable real fast rule lookups.
Helper function to enable real fast rule lookups .
/* make sure we do not jump backward */