mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-06 21:06:11 +02:00
ofproto_v1_0: add nx_stats constants
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
e4ed8f7f60
commit
0bfc3cdee2
@ -598,6 +598,11 @@ NXFF_NXM = 2
|
||||
NXPIF_OPENFLOW10 = 0
|
||||
NXPIF_NXM = 1
|
||||
|
||||
# enum nx_stats_types
|
||||
NXST_FLOW = 0
|
||||
NXST_AGGREGATE = 1
|
||||
NXST_FLOW_MONITOR = 2
|
||||
|
||||
NICIRA_HEADER_PACK_STR = '!II'
|
||||
NICIRA_HEADER_SIZE = 16
|
||||
assert (calcsize(NICIRA_HEADER_PACK_STR) +
|
||||
@ -648,6 +653,22 @@ NX_CONTROLLER_ID_SIZE = 24
|
||||
assert (calcsize(NX_CONTROLLER_ID_PACK_STR) +
|
||||
NICIRA_HEADER_SIZE == NX_CONTROLLER_ID_SIZE)
|
||||
|
||||
NX_STATS_MSG_PACK_STR = '!I4x'
|
||||
NX_STATS_MSG0_SIZE = 8
|
||||
assert calcsize(NX_STATS_MSG_PACK_STR) == NX_STATS_MSG0_SIZE
|
||||
NX_STATS_MSG_SIZE = 24
|
||||
assert (calcsize(NX_STATS_MSG_PACK_STR) + OFP_VENDOR_STATS_MSG_SIZE ==
|
||||
NX_STATS_MSG_SIZE)
|
||||
|
||||
NX_FLOW_STATS_REQUEST_PACK_STR = '!2HB3x'
|
||||
NX_FLOW_STATS_REQUEST_SIZE = 8
|
||||
assert (calcsize(NX_FLOW_STATS_REQUEST_PACK_STR) ==
|
||||
NX_FLOW_STATS_REQUEST_SIZE)
|
||||
|
||||
NX_FLOW_STATS_PACK_STR = '!HBxIIHHHHHHQQQ'
|
||||
NX_FLOW_STATS_SIZE = 48
|
||||
assert calcsize(NX_FLOW_STATS_PACK_STR) == NX_FLOW_STATS_SIZE
|
||||
|
||||
|
||||
def nxm_header__(vendor, field, hasmask, length):
|
||||
return (vendor << 16) | (field << 9) | (hasmask << 8) | length
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user