Added flow expire/stats tests
Contributions from Google test engineers. Basic tests for flow
expiration message generation and stats checking. They also
added code for properly managing network prototype and wildcards
for TCP/UDP packets in parse.py.
diff --git a/src/python/oftest/parse.py b/src/python/oftest/parse.py
index c8d9ad9..13dac43 100644
--- a/src/python/oftest/parse.py
+++ b/src/python/oftest/parse.py
@@ -302,6 +302,14 @@
match.wildcards &= ~OFPFW_NW_TOS
if tcp:
+ match.nw_proto = 6
+ match.wildcards &= ~OFPFW_NW_PROTO
+ elif not tcp and udp:
+ tcp = udp
+ match.nw_proto = 17
+ match.wildcards &= ~OFPFW_NW_PROTO
+
+ if tcp:
match.tp_src = tcp.sport
match.wildcards &= ~OFPFW_TP_SRC
match.tp_dst = tcp.dport