In general, POX doesn't "save" information on previous events for you. If you want it, you should save it yourself. For example, if you want port information, you can create a dictionary in a global variable, use the DPID as the key, and save port information as the values.
Port information is actually one place where POX *does* try to keep such information for you. In the .ports attribute of the Connection object. As described in the manual. -- Murphy On Mar 19, 2014, at 12:52 PM, Rizwan Jamil <u_r_wel...@hotmail.com> wrote: > Dear Murphy! > > That section on the POX manual was a bit helpful. But what I am trying to do > is to check ports states of other switches from within the PacketIn event > handler of one switch. For that I need to access the "state" flag of > "ofp.desc" attribute of the PortStatus events of different switches from > within the PacketIn event handler of one switch. > > The manual shows how to get the connection objects by DPIDs but it does not > show how to access attributes of a specific event (PortStatus event here) > from those connection objects. So how to do that? > > Regards, > Rizwan Jamil > > From: u_r_wel...@hotmail.com > To: murphy.mccau...@gmail.com > Date: Mon, 24 Feb 2014 06:42:06 +0000 > CC: pox-dev@lists.noxrepo.org > Subject: Re: [pox-dev] How to Access Other Switches from Event Handler of A > Switch > > Thanks. > > > > Subject: Re: [pox-dev] How to Access Other Switches from Event Handler of A > Switch > From: murphy.mccau...@gmail.com > Date: Sun, 23 Feb 2014 13:21:05 -0800 > CC: pox-dev@lists.noxrepo.org > To: u_r_wel...@hotmail.com > > The section "Communicating with a Datapath (Switch)" in the manual may be > useful to you. > > -- Murphy > > On Feb 22, 2014, at 11:33 PM, Rizwan Jamil <u_r_wel...@hotmail.com> wrote: > > Dear All ! > > > My question is regarding the controller: that how can I access the parameters > of other switches of a network FROM WITHIN the event handler of one of the > switches of that same network? > > > For example, I require to delete all flows in all switches in a network > whenever any port of any one of the switches goes down. So I think I would > have to access the flow tables of other switches from within the event > handler (Ports Status) of the switch which has triggered the removal/deletion > of one of its ports. But is it possible to do? How? > > > Another example is that, in a ring-protected network, I want to install the > flow in a switch for the shorter of the two paths with the help of an > algorithm. But while handling the packet_in event and before installing the > flow for the shorter path, I also require to make a check that whether or not > the ports of all switches upto the destination switch are up. If up, then > install that flow (for the shorter path), otherwise install the flow for the > other i.e. longer path. So it is possible to read the ports states of other > switches from within the packet_in handler of one of the switches which is > asking for a flow to the destination? > > > Please help!