<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Thank you Durga </div><div>I tried it with what you have said and I received same errors :(</div><div><br></div><div>It is   event.dpid</div><div><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">from pox.forwarding.l2_multi import *</span></div><div><br></div><div>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</div><div>Ok if that, how is it switch from l2 to l3, while working.</div><div><br></div><div><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">Regards</span></div><div><br>Sent from my iPhone</div><div><br>On ١٦‏/١١‏/٢٠١٣, at ٢:٠٠ ص, durga <<a href="mailto:c.vijaya.durga@gmail.com">c.vijaya.durga@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)">hello,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)">

<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)">is it really f<span style="font-family:arial,sans-serif;font-size:13px;color:rgb(34,34,34)">rom pox.<b>forearding</b>.l2_multi import * and not  'from pox.forwarding.l2_multi import *</span></div>

<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(153,51,0)"><span style="font-family:arial,sans-serif;font-size:13px;color:rgb(34,34,34)">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 </span></div>

</div><div class="gmail_extra"><br clear="all"><div>Cheers!<br>Durga<br><br></div>
<br><br><div class="gmail_quote">On Sat, Nov 16, 2013 at 5:17 AM, Amer <span dir="ltr"><<a href="mailto:amer7777@hotmail.com" target="_blank">amer7777@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello,<br>
<br>
<br>
I want to create a handle packetin method, if the incoming packet is from specific switch run l2 if it from another run l3<br>
What I did<br>
<br>
from pox.forearding.l2_multi import *<br>
<br>
def H_P (event):<br>
   p = event.parsed<br>
   If (p.dpid == "1"):<br>
     sw= Switch()<br>
     sw._handle_PacketIn(event)<br>
   Else:<br>
      #. L3.learning<br>
<br>
I have received this error:<br>
NoneType object has no Len()<br>
<br>
Pox.py l2l3 openflow.discovery<br>
<br>
Any help is appreciated<br>
<br>
Best regards,<br>
Amer<br>
</blockquote></div><br></div>
</div></blockquote></body></html>