[Bro-Dev] more set operators? (equality/subset)

Vern Paxson vern at corelight.com
Sun Jun 24 19:07:06 PDT 2018


I've implemented the set operators we discussed, and am now developing
test cases.

In the process, I'm finding that it would be handy to have set equality
and subset/superset testing.  These would be (for type equivalence sets):

	s1 == s2  iff  both sets have exactly the same members

	s1 < s2   iff  every element in s1 is in s2, but s2 has some
		       elements not in s1

	analogous <=, >, >=, != operators

These can already be implemented in terms of existing operators
(if I haven't screwed something up):

	s1 == s2  <=>  |s1 & s2| == |s1 | s2|
	s1 < s2   <=>  |s1 & s2| == |s1| && |s1| < |s2|

Any concerns with adding these too?

		Vern


More information about the bro-dev mailing list