of1.0: fix/add PortMod message
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
94965a3b5b
commit
0c3dd305c6
@ -154,7 +154,7 @@ OFP_PORT_STATUS_SIZE = 64
|
||||
assert (calcsize(OFP_PORT_STATUS_PACK_STR) + OFP_HEADER_SIZE ==
|
||||
OFP_PORT_STATUS_SIZE)
|
||||
|
||||
OFP_PORT_MOD_PACK_STR = '!H' + OFP_ETH_ALEN_STR + 'BIII4x'
|
||||
OFP_PORT_MOD_PACK_STR = '!H' + OFP_ETH_ALEN_STR + 'sIII4x'
|
||||
OFP_PORT_MOD_SIZE = 32
|
||||
assert calcsize(OFP_PORT_MOD_PACK_STR) + OFP_HEADER_SIZE == OFP_PORT_MOD_SIZE
|
||||
|
||||
|
@ -1879,6 +1879,23 @@ class OFPFlowMod(MsgBase):
|
||||
offset += a.len
|
||||
|
||||
|
||||
@_set_msg_type(ofproto_v1_0.OFPT_PORT_MOD)
|
||||
class OFPPortMod(MsgBase):
|
||||
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
|
||||
super(OFPPortMod, self).__init__(datapath)
|
||||
self.port_no = port_no
|
||||
self.hw_addr = hw_addr
|
||||
self.config = config
|
||||
self.mask = mask
|
||||
self.advertise = advertise
|
||||
|
||||
def _serialize_body(self):
|
||||
msg_pack_into(ofproto_v1_0.OFP_PORT_MOD_PACK_STR,
|
||||
self.buf, ofproto_v1_0.OFP_HEADER_SIZE,
|
||||
self.port_no, self.hw_addr,
|
||||
self.config, self.mask, self.advertise)
|
||||
|
||||
|
||||
@_set_msg_reply(OFPBarrierReply)
|
||||
@_set_msg_type(ofproto_v1_0.OFPT_BARRIER_REQUEST)
|
||||
class OFPBarrierRequest(MsgBase):
|
||||
|
Loading…
Reference in New Issue
Block a user