mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
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>
This commit is contained in:
parent
7ec9537b06
commit
2a0d6862d2
@ -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):
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user