If you want to do it yourself, just monitor datapath_join events.  These are 
fired whenever a switch connects, and the event object holds the dpid of the 
switch.  Store these in a list.

Or you can just make use of the topology component, which does pretty much 
exactly this (along with some other stuff), and then has a method to get a list 
of all connected switches.

Hope that helps.
-- Murphy

On Jul 23, 2011, at 11:04 PM, ali ahmad wrote:

> hi!
>  i am using multiple switches with a single controller than  if i want
> to flood the message at all the ports of all the switches than how would i 
> know
> that what are the dpids of the switches. like i have to call this fuction to 
> flood the message
> on all the switches.
> 
>  def send_openflow(self, dp_id, buffer_id, packet, actions,
>                       inport=openflow.OFPP_CONTROLLER):
>         """
>         Sends an openflow packet to a datapath.
> 
>         This function is a convenient wrapper for send_openflow_packet
>         and send_openflow_buffer for situations where it is unknown in
>         advance whether the packet to be sent is buffered.  If
>         'buffer_id' is -1, it sends 'packet'; otherwise, it sends the
>         buffer represented by 'buffer_id'.
> 
>         dp_id - datapath to send packet to
>         buffer_id - id of buffer to send out
>         packet - data to put in openflow packet
>         actions - list of actions or dp port to send out of
>         inport - dp port to mark as source (defaults to Controller
>                  port)
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to