Signed-off-by: Simon Horman <[email protected]>
---
ryu/ofproto/ofproto_v1_4_parser.py | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py
b/ryu/ofproto/ofproto_v1_4_parser.py
index 226e6f3..8428821 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -2371,6 +2371,35 @@ class OFPActionDecMplsTtl(OFPAction):
return cls()
[email protected]_action_type(ofproto.OFPAT_SET_NW_TTL,
+ ofproto.OFP_ACTION_NW_TTL_SIZE)
+class OFPActionSetNwTtl(OFPAction):
+ """
+ Set IP TTL action
+
+ This action sets the IP TTL.
+
+ ================ ======================================================
+ Attribute Description
+ ================ ======================================================
+ nw_ttl IP TTL
+ ================ ======================================================
+ """
+ def __init__(self, nw_ttl, type_=None, len_=None):
+ super(OFPActionSetNwTtl, self).__init__()
+ self.nw_ttl = nw_ttl
+
+ @classmethod
+ def parser(cls, buf, offset):
+ (type_, len_, nw_ttl) = struct.unpack_from(
+ ofproto.OFP_ACTION_NW_TTL_PACK_STR, buf, offset)
+ return cls(nw_ttl)
+
+ def serialize(self, buf, offset):
+ msg_pack_into(ofproto.OFP_ACTION_NW_TTL_PACK_STR, buf, offset,
+ self.type, self.len, self.nw_ttl)
+
+
@OFPAction.register_action_type(ofproto.OFPAT_DEC_NW_TTL,
ofproto.OFP_ACTION_HEADER_SIZE)
class OFPActionDecNwTtl(OFPAction):
--
1.8.4
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel