summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>2013-09-02 15:05:58 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-09-02 19:41:37 +0900
commit50bfeb7ab96f167ac6cc7e9ea12a4e5c50ee2e65 (patch)
tree4eec22c843fa7877661d28a6b3dfee13cd6e7461
parent1e93f598645aaaa6c1af610bc07a4bd5f66dca80 (diff)
of12: make OFPErrorExperimenterMsg.type visible to users
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_2_parser.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py
index 4ff7bc97..66e26604 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -144,9 +144,10 @@ class OFPErrorMsg(MsgBase):
class OFPErrorExperimenterMsg(MsgBase):
- def __init__(self, datapath, exp_type=None, experimenter=None, data=None):
+ def __init__(self, datapath, type_=None, exp_type=None, experimenter=None,
+ data=None):
super(OFPErrorExperimenterMsg, self).__init__(datapath)
- self._type = None
+ self.type = ofproto_v1_2.OFPET_EXPERIMENTER
self.exp_type = exp_type
self.experimenter = experimenter
self.data = data
@@ -156,7 +157,7 @@ class OFPErrorExperimenterMsg(MsgBase):
cls.cls_msg_type = msg_type
msg = super(OFPErrorExperimenterMsg, cls).parser(
datapath, version, msg_type, msg_len, xid, buf)
- msg._type, msg.exp_type, msg.experimenter = struct.unpack_from(
+ msg.type, msg.exp_type, msg.experimenter = struct.unpack_from(
ofproto_v1_2.OFP_ERROR_EXPERIMENTER_MSG_PACK_STR, msg.buf,
ofproto_v1_2.OFP_HEADER_SIZE)
msg.data = msg.buf[ofproto_v1_2.OFP_ERROR_EXPERIMENTER_SIZE:]