I'm not sure how you would go about obtaining the switches ip though nox. Though it think it should be possible to get when the switches join. Any reason you would need to do that?
One thing I've done is set the dpid of each switch to the ip address of the switch (in hex padded with 0's). Also, there is some information about the switch in the stats structure (I.E how many ports are on the switch, etc). You can get this from the datapath_join_callback(dpid,stats). Aaron On Thu, Sep 8, 2011 at 9:45 AM, Shrutarshi Basu <ba...@cs.cornell.edu> wrote: > Ahh ok, that makes sense. Since the dpid represents the switch, is there > some way to use it to get more information about the switch (like its IP)? It > doesn't seem like information like this is in the packet. > > > On Wednesday, September 7, 2011 at 11:35 PM, Aaron Rosen wrote: > >> Hi Shrutarshi, >> >> Each datapathID (dpid) received from a packet in event represents the >> switch that the packet came in on. >> >> You just need to do something like this: >> >> def packet_in_callback(dpid, inport, reason, len, bufid, packet): >> flow = extract_flow(packet); >> inst.install_datapath_flow(dpid, .....) >> >> flow={} >> flow[w/e...] >> #install another flow_mod >> inst.install_datapath_flow(dpid, .....) >> >> >> >> Hope that helps, >> >> Aaron >> >> >> On Wed, Sep 7, 2011 at 11:30 PM, Shrutarshi Basu <ba...@cs.cornell.edu >> (mailto:ba...@cs.cornell.edu)> wrote: >> > Hi, >> > I'm using NOX via the Python API. I would like to install multiple new >> > data path flows as part of a packet_in handler. I am wondering how I can >> > get or create a new data path ID, or can I reuse the ID that gets sent to >> > the handler? I haven't been able to find any example where a handler >> > installs multiple data path flows at once. >> > Thanks, >> > Basu >> > >> > _______________________________________________ >> > nox-dev mailing list >> > nox-dev@noxrepo.org (mailto:nox-dev@noxrepo.org) >> > http://noxrepo.org/mailman/listinfo/nox-dev >> >> >> >> -- >> Aaron O. Rosen >> Masters Student - Network Communication >> 306B Fluor Daniel > > > -- Aaron O. Rosen Masters Student - Network Communication 306B Fluor Daniel _______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev