diff options
author | Simon Horman <horms@verge.net.au> | 2014-01-29 12:06:04 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-01-29 12:42:56 +0900 |
commit | b7455bc353c68d2224ba8cefb319c53de4b54d74 (patch) | |
tree | fb217aa71118eae533915eef1853d838bb54c9f7 | |
parent | 281be18dccb31856b404b0b938f6a7668fedf40d (diff) |
Add OF1.4 DecMplsTtl 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.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py index 3f28f72e..9270ac60 100644 --- a/ryu/ofproto/ofproto_v1_4_parser.py +++ b/ryu/ofproto/ofproto_v1_4_parser.py @@ -2324,6 +2324,24 @@ class OFPActionSetQueue(OFPAction): offset, self.type, self.len, self.queue_id) +@OFPAction.register_action_type(ofproto.OFPAT_DEC_MPLS_TTL, + ofproto.OFP_ACTION_HEADER_SIZE) +class OFPActionDecMplsTtl(OFPAction): + """ + Decrement MPLS TTL action + + This action decrements the MPLS TTL. + """ + def __init__(self, type_=None, len_=None): + super(OFPActionDecMplsTtl, 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_COPY_TTL_OUT, ofproto.OFP_ACTION_HEADER_SIZE) class OFPActionCopyTtlOut(OFPAction): |