I wrote a sample and posted it in the wiki sometime ago.

https://github.com/hip2b2/poxstuff/blob/master/flow_stats.py

Sent on the move.
From: Hong Wayne
Sent: Saturday, June 22, 2013 10:02 PM
Subject: [pox-dev] The ofp_port_stats information from OpenFlow switch

Dear all:


I want to send ''of.ofp_port_status'' message from POX controller to get port statistic information, such as port number and tx_packets at OpenFlow switch.

And I found the nx_switch.py module in POX has some simple examples like below:

_messages_for_all = set([of.ofp_port_status])
if type(message) in _messages_for_all:
      for c in self.connections:
        c.send(message)
        connections_used.append(c)

But how can I get the reply information from OpenFlow switch? 

Hope someone give me some advice. Thanks.



Reply via email to