Signed-off-by: FUJITA Tomonori <[email protected]>
---
ryu/ofproto/ofproto_v1_0.py | 5 +++++
ryu/ofproto/ofproto_v1_0_parser.py | 23 +++++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/ryu/ofproto/ofproto_v1_0.py b/ryu/ofproto/ofproto_v1_0.py
index a757e13..08d2599 100644
--- a/ryu/ofproto/ofproto_v1_0.py
+++ b/ryu/ofproto/ofproto_v1_0.py
@@ -238,6 +238,7 @@ NXAST_REG_MOVE = 6
NXAST_REG_LOAD = 7
NXAST_SET_TUNNEL64 = 9
NXAST_MULTIPATH = 10
+NXAST_AUTOPATH = 11
NXAST_BUNDLE = 12
NXAST_BUNDLE_LOAD = 13
NXAST_RESUBMIT_TABLE = 14
@@ -272,6 +273,10 @@ NX_ACTION_BUNDLE_PACK_STR = '!HHIHHHHIHHI4x'
NX_ACTION_BUNDLE_SIZE = 32
assert calcsize(NX_ACTION_BUNDLE_PACK_STR) == NX_ACTION_BUNDLE_SIZE
+NX_ACTION_AUTOPATH_PACK_STR = '!HHIHHII4x'
+NX_ACTION_AUTOPATH_SIZE = 24
+assert calcsize(NX_ACTION_AUTOPATH_PACK_STR) == NX_ACTION_AUTOPATH_SIZE
+
NX_ACTION_OUTPUT_REG_PACK_STR = '!HHIHHIH6x'
NX_ACTION_OUTPUT_REG_SIZE = 24
assert calcsize(NX_ACTION_OUTPUT_REG_PACK_STR) == NX_ACTION_OUTPUT_REG_SIZE
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py
b/ryu/ofproto/ofproto_v1_0_parser.py
index 2e81b27..ee4c9d5 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -661,6 +661,29 @@ class NXActionBundleLoad(NXActionBundleBase):
return NXActionBundleBase.parser(NXActionBundleLoad, buf, offset)
[email protected]_nx_action_subtype(ofproto_v1_0.NXAST_AUTOPATH)
+class NXActionAutopath(NXActionHeader):
+ def __init__(self, ofs_nbits, dst, _id):
+ super(NXActionAutopath, self).__init__(
+ ofproto_v1_0.NXAST_AUTOPATH,
+ ofproto_v1_0.NX_ACTION_AUTOPATH_SIZE)
+ self.ofs_nbits = ofs_nbits
+ self.dst = dst
+ self.id = _id
+
+ def serialize(self, buf, offset):
+ msg_pack_into(ofproto_v1_0.NX_ACTION_OUTPUT_REG_PACK_STR, buf, offset,
+ self.type, self.len, self.vendor, self.subtype,
+ self.ofs_nbits, self.dst, self.id)
+
+ @classmethod
+ def parser(cls, buf, offset):
+ (type_, len_, vendor, subtype, ofs_nbits, dst,
+ _id) = struct.unpack_from(
+ ofproto_v1_0.NX_ACTION_AUTOPATH_PACK_STR, buf, offset)
+ return cls(ofs_nbits, dst, _id)
+
+
@NXActionHeader.register_nx_action_subtype(ofproto_v1_0.NXAST_OUTPUT_REG)
class NXActionOutputReg(NXActionHeader):
def __init__(self, ofs_nbits, src, max_len):
--
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