noxrepo/pox — pull request #21 by andiwundsam (2012-06-14 01:32:39+00:00)
Title: libopenflow: convert wildcards for wireformat openflow

OF1.0 implicitely (and OF excplitely) assumes that irrelevant
match fields are set to 0 and /not wildcarded/.
E.g., when the dl_type != 0x800, the nw_tos is set to 0 and
the nw_tos wildcard is *cleared*.

This doesn't make a ton of sense. Semantically, a dl_type of !0x800
means 'the nw_*' flags are /always/ wildcarded. But alas,
this is the way OVS and other implementations seem to work.

To comply with the de-facto behavior of OF1.0 (and the spec'd behavior
of OF1.1), we clear the appropriate wildcard bits on the way out to
the wire (pack). Then, we re-enable the aprioriate wildcard bits on
the way in (unpack), so our users can use the intuitive notion of
is_wildcarded(x) => the match doesn't care about x