diff options
Diffstat (limited to 'ryu/lib/ofctl_v1_2.py')
-rw-r--r-- | ryu/lib/ofctl_v1_2.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py index 0f767cda..dec8c7e2 100644 --- a/ryu/lib/ofctl_v1_2.py +++ b/ryu/lib/ofctl_v1_2.py @@ -588,13 +588,13 @@ def get_queue_stats(dp, waiters): return desc -def get_flow_stats(dp, waiters): - table_id = dp.ofproto.OFPTT_ALL - out_port = dp.ofproto.OFPP_ANY - out_group = dp.ofproto.OFPG_ANY - cookie = 0 - cookie_mask = 0 - match = dp.ofproto_parser.OFPMatch() +def get_flow_stats(dp, waiters, flow={}): + table_id = int(flow.get('table_id', dp.ofproto.OFPTT_ALL)) + out_port = int(flow.get('out_port', dp.ofproto.OFPP_ANY)) + out_group = int(flow.get('out_group', dp.ofproto.OFPG_ANY)) + cookie = int(flow.get('cookie', 0)) + cookie_mask = int(flow.get('cookie_mask', 0)) + match = to_match(dp, flow.get('match', {})) stats = dp.ofproto_parser.OFPFlowStatsRequest( dp, table_id, out_port, out_group, cookie, cookie_mask, match) |