We will often refer to a rule by its index into the allRules array, which is just the string formula of the rule.
For now we are assuming that the rules are partitioned into three sets: those that depend on dest port, those that depend on src but not dest, and those that depend on neither source nor destination.
The variable ordering is taken to be destPort < srcPort < destIp < srcIp for all the BDDs.
The destPort bits are MSB to LSB in the BDD, ditto for the other port and IP bits. This will also help with the actual lookup.
The distinctL4RulesTable keeps track of the distinct L4 rules we've seen - it maps the BDD to an int id, which can be used to index into L4RuleIdToL7ruleSetTable, which tells us for a given L4 rule what the original rules were - the set of corresponding rules is represented by a var_set_t of length numAllRules.
There are three arrays of L4 lookup tables - one for each of the groups - destPortRules, srcPortRules, noPortRules. See the L4 lookup table structure for details.
Definition at line 428 of file evl.h.