packets: Adds ethernet-matching helper functions
authorJoe Stringer <joe@wand.net.nz>
Tue, 29 May 2012 18:07:16 +0000 (11:07 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 29 May 2012 18:08:11 +0000 (11:08 -0700)
commit3b4d8ad3070ad30da9cf52d4f2abf792bc07f20d
tree49a45874265e40b61c446f097eb8889db75a718e
parent518852130bdf45522f76afe7d500a3c0e02d46e3
packets: Adds ethernet-matching helper functions

With OpenFlow 1.1 requiring arbitrary ethernet match support, it simplifies
other code if we have some extra helper functions. This patch adds
eth_mask_is_exact(mask), eth_addr_bitand(src, mask, dst),
eth_addr_equal_except(a, b, mask) and eth_format_masked(eth, mask, output).

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
lib/meta-flow.c
lib/packets.c
lib/packets.h