mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 04:16:11 +02:00
of13: make OFPPacketOut.actions_len visible to users
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
d388d994c9
commit
1bf4f6ddd3
@ -2218,23 +2218,23 @@ class OFPPacketOut(MsgBase):
|
||||
datapath.send_msg(req)
|
||||
"""
|
||||
def __init__(self, datapath, buffer_id=None, in_port=None, actions=None,
|
||||
data=None):
|
||||
data=None, actions_len=None):
|
||||
assert in_port is not None
|
||||
|
||||
super(OFPPacketOut, self).__init__(datapath)
|
||||
self.buffer_id = buffer_id
|
||||
self.in_port = in_port
|
||||
self._actions_len = 0
|
||||
self.actions_len = 0
|
||||
self.actions = actions
|
||||
self.data = data
|
||||
|
||||
def _serialize_body(self):
|
||||
self._actions_len = 0
|
||||
self.actions_len = 0
|
||||
offset = ofproto_v1_3.OFP_PACKET_OUT_SIZE
|
||||
for a in self.actions:
|
||||
a.serialize(self.buf, offset)
|
||||
offset += a.len
|
||||
self._actions_len += a.len
|
||||
self.actions_len += a.len
|
||||
|
||||
if self.data is not None:
|
||||
assert self.buffer_id == 0xffffffff
|
||||
@ -2242,7 +2242,7 @@ class OFPPacketOut(MsgBase):
|
||||
|
||||
msg_pack_into(ofproto_v1_3.OFP_PACKET_OUT_PACK_STR,
|
||||
self.buf, ofproto_v1_3.OFP_HEADER_SIZE,
|
||||
self.buffer_id, self.in_port, self._actions_len)
|
||||
self.buffer_id, self.in_port, self.actions_len)
|
||||
|
||||
|
||||
@_set_msg_type(ofproto_v1_3.OFPT_FLOW_MOD)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user