NXT_ROLE_REQUEST/REPLY use the same on-wire format (NX_ROLE_PACK_STR).

Signed-off-by: FUJITA Tomonori <[email protected]>
---
 ryu/ofproto/ofproto_v1_0.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ryu/ofproto/ofproto_v1_0.py b/ryu/ofproto/ofproto_v1_0.py
index a757e13..3492106 100644
--- a/ryu/ofproto/ofproto_v1_0.py
+++ b/ryu/ofproto/ofproto_v1_0.py
@@ -536,10 +536,17 @@ assert (calcsize(OFP_QUEUE_PROP_MIN_RATE_PACK_STR) +
 NX_VENDOR_ID = 0x00002320
 
 # enum nicira_type (abridged)
+NXT_ROLE_REQUEST = 10
+NXT_ROLE_REPLY = 11
 NXT_SET_FLOW_FORMAT = 12
 NXT_FLOW_MOD = 13
 NXT_FLOW_MOD_TABLE_ID = 15
 
+# enum nx_role
+NX_ROLE_OTHER = 0
+NX_ROLE_MASTER = 1
+NX_ROLE_SLAVE = 2
+
 # enum nx_flow_format
 NXFF_OPENFLOW10 = 0
 NXFF_NXM = 2
@@ -549,6 +556,11 @@ NICIRA_HEADER_SIZE = 16
 assert (calcsize(NICIRA_HEADER_PACK_STR) +
         OFP_HEADER_SIZE == NICIRA_HEADER_SIZE)
 
+NX_ROLE_PACK_STR = '!I'
+NX_ROLE_SIZE = 20
+assert (calcsize(NX_ROLE_PACK_STR) +
+        NICIRA_HEADER_SIZE == NX_ROLE_SIZE)
+
 NX_FLOW_MOD_PACK_STR = '!Q4HI3H6x'
 NX_FLOW_MOD_SIZE = 48
 assert (calcsize(NX_FLOW_MOD_PACK_STR) +
-- 
1.7.4.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to