diff options
author | Simon Horman <horms@verge.net.au> | 2014-03-11 10:42:06 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-03-16 21:42:23 +0900 |
commit | f9888ba9411d3fa67cfd9c18640971c9f6030c37 (patch) | |
tree | 9c798116dc1e7895e6256d5afd268ffa03bcd16f | |
parent | 7b3c1ab9cd751a12cad931995286c20776bae301 (diff) |
of14: Add OFPAsyncConfigProp
This will be used by a revised implementations of
get async request reply and set async
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 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py index 74a6e33a..42dfcd8e 100644 --- a/ryu/ofproto/ofproto_v1_4_parser.py +++ b/ryu/ofproto/ofproto_v1_4_parser.py @@ -5639,6 +5639,51 @@ class OFPRoleReply(MsgBase): return msg +class OFPAsyncConfigProp(OFPPropBase): + _TYPES = {} + + +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_PACKET_IN_SLAVE) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_PACKET_IN_MASTER) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_PORT_STATUS_SLAVE) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_PORT_STATUS_MASTER) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_FLOW_REMOVED_SLAVE) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_FLOW_REMOVED_MASTER) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_ROLE_STATUS_SLAVE) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_ROLE_STATUS_MASTER) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_TABLE_STATUS_SLAVE) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_TABLE_STATUS_MASTER) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_REQUESTFORWARD_SLAVE) +@OFPAsyncConfigProp.register_type(ofproto.OFPACPT_REQUESTFORWARD_MASTER) +class OFPAsyncConfigPropReasons(StringifyMixin): + def __init__(self, type_=None, length=None, mask=None): + self.type = type_ + self.length = length + self.mask = mask + + @classmethod + def parser(cls, buf): + reasons = cls() + (reasons.type, reasons.length, reasons.mask) = struct.unpack_from( + ofproto.OFP_ASYNC_CONFIG_PROP_REASONS_PACK_STR, buf, 0) + return reasons + + def serialize(self): + # fixup + self.length = ofproto.OFP_ASYNC_CONFIG_PROP_REASONS_SIZE + + buf = bytearray() + msg_pack_into(ofproto.OFP_ASYNC_CONFIG_PROP_REASONS_PACK_STR, buf, 0, + self.type, self.length, self.mask) + return buf + + +@OFPAsyncConfigProp.register_type(ofproto.OFPTFPT_EXPERIMENTER_SLAVE) +@OFPAsyncConfigProp.register_type(ofproto.OFPTFPT_EXPERIMENTER_MASTER) +class OFPQueueDescPropExperimenter(OFPPropCommonExperimenter4ByteData): + pass + + @_set_msg_type(ofproto.OFPT_GET_ASYNC_REQUEST) class OFPGetAsyncRequest(MsgBase): """ |