Add tag rules and split out rule serialize/deserialize so the code can be reused.

This commit is contained in:
Adam Ierymenko 2016-08-03 14:12:38 -07:00
parent 91940cbcf5
commit 67cb03742e
3 changed files with 155 additions and 93 deletions

View file

@ -243,6 +243,11 @@ bool Filter::run(
case ZT_NETWORK_RULE_MATCH_FRAME_SIZE_RANGE:
thisRuleMatches = (uint8_t)((frameLen >= (unsigned int)rules[rn].v.frameSize[0])&&(frameLen <= (unsigned int)rules[rn].v.frameSize[1]));
break;
case ZT_NETWORK_RULE_MATCH_TAG_VALUE_RANGE:
break;
case ZT_NETWORK_RULE_MATCH_TAG_VALUE_BITS_ALL:
case ZT_NETWORK_RULE_MATCH_TAG_VALUE_BITS_ANY:
break;
}
// thisSetMatches remains true if the current rule matched... or does NOT match if not bit (0x80) is 1