summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-01-29 12:05:57 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-01-29 12:42:54 +0900
commit3de81a208fe59fb5fdcbcede272696ecae9ae24d (patch)
tree36d34dd206e047dfbc8945a3a536b283f30b5c6a
parent384adb3919d8ce6e2c258c8a8f6ecae50dbbd850 (diff)
Add OF1.4 CopyTtlIn 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 d1cf5c79..3f73e803 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -2343,6 +2343,25 @@ class OFPActionCopyTtlOut(OFPAction):
return cls()
+@OFPAction.register_action_type(ofproto.OFPAT_COPY_TTL_IN,
+ ofproto.OFP_ACTION_HEADER_SIZE)
+class OFPActionCopyTtlIn(OFPAction):
+ """
+ Copy TTL In action
+
+ This action copies the TTL from the outermost header with TTL to the
+ next-to-outermost header with TTL.
+ """
+ def __init__(self, type_=None, len_=None):
+ super(OFPActionCopyTtlIn, 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):