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

diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
b/ryu/ofproto/ofproto_v1_0_parser.py
index 859cfd5..40c748f 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -1006,6 +1006,7 @@ class OFPVendor(MsgBase):
         self.buf += self.data
 
 
[email protected]_vendor(ofproto_v1_0.NX_VENDOR_ID)
 class NiciraHeader(OFPVendor):
     _NX_SUBTYPES = {}
 
@@ -1108,6 +1109,20 @@ class NXTRoleRequest(NiciraHeader):
                       self.buf, ofproto_v1_0.NICIRA_HEADER_SIZE, self.role)
 
 
[email protected]_nx_subtype(ofproto_v1_0.NXT_ROLE_REPLY)
+class NXTRoleReply(NiciraHeader):
+    def __init__(self, datapath, role):
+        super(NXTRoleReply, self).__init__(
+            datapath, ofproto_v1_0.NXT_ROLE_REPLY)
+        self.role = role
+
+    @classmethod
+    def parser(cls, datapath, buf, offset):
+        (role,) = struct.unpack_from(
+            ofproto_v1_0.NX_ROLE_PACK_STR, buf, offset)
+        return cls(datapath, role)
+
+
 class NXTFlowModTableId(NiciraHeader):
     def __init__(self, datapath, set_):
         super(NXTFlowModTableId, self).__init__(
-- 
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