diff options
author | Yusuke Iwase <iwase.yusuke0@gmail.com> | 2015-08-19 10:21:31 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-20 18:22:12 +0900 |
commit | 2a0d6862d2daf6fe79d555a09ce54b474c5d84c5 (patch) | |
tree | 8ffcfb62e305ba2368ecabb0ce5dfb7e944c0749 | |
parent | 7ec9537b06cba62277dfdf25b107c8f0bda5e1bd (diff) |
ofproto_v1_5_parser: Add OFPControllerStatusProp support
OpenFlow Spec 1.5 introduces controller status property to describe
additional controller status information.
This patch add controller status property support.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_5_parser.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_5_parser.py b/ryu/ofproto/ofproto_v1_5_parser.py index ba593b8e..defbe8eb 100644 --- a/ryu/ofproto/ofproto_v1_5_parser.py +++ b/ryu/ofproto/ofproto_v1_5_parser.py @@ -5228,6 +5228,35 @@ class OFPRequestForward(MsgInMsgBase): self.buf += self.request.buf +class OFPControllerStatusProp(OFPPropBase): + _TYPES = {} + + +@OFPControllerStatusProp.register_type(ofproto.OFPCSPT_URI) +class OFPControllerStatusPropUri(OFPControllerStatusProp): + _TYPE = { + 'ascii': [ + 'uri', + ] + } + + def __init__(self, type_=None, length=None, uri=None): + super(OFPControllerStatusPropUri, self).__init__(type_, length) + self.uri = uri + + @classmethod + def parser(cls, buf): + rest = cls.get_rest(buf) + pack_str = '!%ds' % len(rest) + (uri, ) = struct.unpack_from(pack_str, rest, 0) + return cls(uri=uri) + + +@OFPControllerStatusProp.register_type(ofproto.OFPCSPT_EXPERIMENTER) +class OFPControllerStatusPropExperimenter(OFPPropCommonExperimenter4ByteData): + pass + + @_set_msg_type(ofproto.OFPT_PACKET_OUT) class OFPPacketOut(MsgBase): """ |