我有这段代码,我想得到 tx_packets 作为回应
.你知道在p_port_stats_request方法中获取吗
for switch in delays_accept:
if core.openflow.getConnection(switch[4]):
connection = core.openflow.getConnection(switch[4])
msg = of.ofp_stats_request()
msg.datapath_id = switch[4]
msg.body = of.ofp_port_stats_request()
msg.body.port_no = 2
msg.body.stats = of.ofp_port_stats_request()
msg.body.stats.port_no = 2
connection.send(msg)
time.sleep(3)
print("relpay for switch:", switch[1])
print(msg)