In a packet in handler or anywhere else you can get the Connection object that 
goes along with the switch you want to know about, you should be able to do 
something like:

print len(event.connection.ports)

This will work better in the betta branch than the older branches.

-- Murphy

On Jan 8, 2013, at 3:17 AM, Julius Bachnick wrote:

> Hi all,
> 
> I need to know the tital number of ports of a switch for different reasons. I 
> was hoping to retrieve that message via ofp_packet_in but it does not seem to 
> be the case. 
> 
> Whant I want to do is handling ConnectionUp Events with the additional 
> information of how many ports a switch has.
> 
> Any suggestions or ideas are welcome!
> 
> 
> Regards,
> 
> Julius

Reply via email to