summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-01-29 12:05:56 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-01-29 12:42:54 +0900
commit384adb3919d8ce6e2c258c8a8f6ecae50dbbd850 (patch)
tree090a383abedd4cdd4a2e89cffc45dfa533898c87
parent5231ba3b3876fb6da01f6c63e3a9704a9c20103d (diff)
Add OF1.4 CopyTtlOut action support
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_4_parser.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index 8b4ee60d..d1cf5c79 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -2324,6 +2324,25 @@ class OFPActionSetQueue(OFPAction):
offset, self.type, self.len, self.queue_id)
+@OFPAction.register_action_type(ofproto.OFPAT_COPY_TTL_OUT,
+ ofproto.OFP_ACTION_HEADER_SIZE)
+class OFPActionCopyTtlOut(OFPAction):
+ """
+ Copy TTL Out action
+
+ This action copies the TTL from the next-to-outermost header with TTL to
+ the outermost header with TTL.
+ """
+ def __init__(self, type_=None, len_=None):
+ super(OFPActionCopyTtlOut, self).__init__()
+
+ @classmethod
+ def parser(cls, buf, offset):
+ (type_, len_) = struct.unpack_from(
+ ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
+ return cls()
+
+
@OFPAction.register_action_type(ofproto.OFPAT_SET_FIELD,
ofproto.OFP_ACTION_SET_FIELD_SIZE)
class OFPActionSetField(OFPAction):