Thank you Durga I tried it with what you have said and I received same errors :(
It is event.dpid from pox.forwarding.l2_multi import * I want to know how to do this if statement and it body, i.e., l2 and l3 classes calls. Should l write them in pox.py statement Ok if that, how is it switch from l2 to l3, while working. Regards Sent from my iPhone On ١٦/١١/٢٠١٣, at ٢:٠٠ ص, durga <c.vijaya.du...@gmail.com> wrote: > hello, > > is it really from pox.forearding.l2_multi import * and not 'from > pox.forwarding.l2_multi import * > also, dpid is an attribute of event, I think you can use event.dpid ==1, not > sure if parsed packet has an attribute of dpid . Please use a debug / print > to check value of p.dpid > > Cheers! > Durga > > > > On Sat, Nov 16, 2013 at 5:17 AM, Amer <amer7...@hotmail.com> wrote: >> Hello, >> >> >> I want to create a handle packetin method, if the incoming packet is from >> specific switch run l2 if it from another run l3 >> What I did >> >> from pox.forearding.l2_multi import * >> >> def H_P (event): >> p = event.parsed >> If (p.dpid == "1"): >> sw= Switch() >> sw._handle_PacketIn(event) >> Else: >> #. L3.learning >> >> I have received this error: >> NoneType object has no Len() >> >> Pox.py l2l3 openflow.discovery >> >> Any help is appreciated >> >> Best regards, >> Amer >