Skip to content

Commit

Permalink
add Nicira Extension NXAST_DEC_TTL support
Browse files Browse the repository at this point in the history
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
  • Loading branch information
fujita committed Jun 4, 2012
1 parent ffa2378 commit db34d7a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions ryu/ofproto/ofproto_v1_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
NXAST_RESUBMIT_TABLE = 14
NXAST_OUTPUT_REG = 15
NXAST_EXIT = 17
NXAST_DEC_TTL = 18
NXAST_FIN_TIMEOUT = 19
NXAST_CONTROLLER = 20

Expand Down
18 changes: 18 additions & 0 deletions ryu/ofproto/ofproto_v1_0_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,24 @@ def parser(cls, buf, offset):
return cls()


@NXActionHeader.register_nx_action_subtype(ofproto_v1_0.NXAST_DEC_TTL)
class NXActionDecTtl(NXActionHeader):
def __init__(self):
super(NXActionDecTtl, self).__init__(
ofproto_v1_0.NXAST_DEC_TTL,
ofproto_v1_0.NX_ACTION_HEADER_SIZE)

def serialize(self, buf, offset):
msg_pack_into(ofproto_v1_0.NX_ACTION_HEADER_PACK_STR, buf, offset,
self.type, self.len, self.vendor, self.subtype)

@classmethod
def parser(cls, buf, offset):
(type_, len_, vendor, subtype) = struct.unpack_from(
ofproto_v1_0.NX_ACTION_HEADER_PACK_STR, buf, offset)
return cls()


@NXActionHeader.register_nx_action_subtype(ofproto_v1_0.NXAST_CONTROLLER)
class NXActionController(NXActionHeader):
def __init__(self, max_len, controller_id, reason):
Expand Down

0 comments on commit db34d7a

Please sign in to comment.