On Jan 23, 2013, at 3:23 AM, Ian Beatty-Orr wrote: > Here is the function that creates the of_stats_request message: > > def _handle_ConnectionUp (self, event): > info_getter(event.connection) > bd = of.ofp_port_stats_request( port_no = OFPP_NONE ) > pm = of.ofp_stats_request( type=OFPST_PORT, body=bd ) > event.connection.send(pm) > > > Here is the function that should be receiving replies however it only ever > receives packet.types of LLDP > > def _handle_PacketIn (self, event): > packet = event.parsed > print event, packet, packet.type
The POX Wiki has some information on using ofp_stats_request: http://goo.gl/77h9T As well as some information on events in POX: http://goo.gl/iojHU The problem you're having is that PacketIn events are for relaying packets that missed the flow table to the controller (in an ofp_packet_in message) -- not for other OpenFlow message types being sent to the switch. Stats replies are sent back in an ofp_stats_reply, and have their own set of events which are listed in the manual and can also be looked up in the pydoc or sphinx documentation for the pox.openflow module. There's also an example in the "third party" section of the manual called "Flow Statistics Collector Example" which (despite the name) shows port stats usage. Hope that helps. -- Murphy