<div dir="ltr"><div>If you don't care, I would like to ask  some other question: <br><br>I need access the other bits inside options field, but there is no implementation on POX yet. So, How could I access that values: by using full payload (If yes, how to) or implementing module lib/packet/tcp.py? <br>

<br><br></div>cheers<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/27 Marcus Sandri <span dir="ltr"><<a href="mailto:mwws55@gmail.com" target="_blank">mwws55@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div>Now I can access those values!<br><br></div>Thanks!<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/26 Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>You need to get an actual instance of the tcp_opt class (stored in the .options attribute of the TCP object).  Try something like:</div>


<div><div><br></div>packet = event.parsed<br>packet_tcp = packet.find("tcp")<br></div>if packet_tcp:<div>  for opt in packet_tcp.options:</div><div>    print "type:%s data:%s" % (opt.type, opt.val)</div>


<span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888">-- Murphy   </font></span><div><div><br><div><div><br></div><div>On Dec 26, 2013, at 5:54 AM, Marcus Sandri <<a href="mailto:mwws55@gmail.com" target="_blank">mwws55@gmail.com</a>> wrote:</div>


<br><blockquote type="cite"><div dir="ltr">Exactly,<br><br>            <br>But how can I access .val atributes?<br> I tried: <br><br>packet = event.parsed<br>packet_tcp = packet.find("tcp")<br>if(packet_tcp):<br>


            <br>            tcp_raw = tcp_opt.val<br>

<br><br>But it returns: line 29, in _handle_PacketIn<br>tcp_options = tcp_opt.val<br>AttributeError: class tcp_opt has no attribute 'val'<br><br>It works with the tcp_opt constants, such as: EOL, SACK, etc.<br><br>




Am I doing something wrong?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/26 Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span><br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When the packet library parses it, it should end up in the TCP object's .options collection.  The packet library doesn't currently have support for MPTCP, so I think it should just end up with the raw bytes in the tcp_opt object's .val attribute.<br>





<span><font color="#888888"><br>
-- Murphy<br>
</font></span><div><div><br>
On Dec 25, 2013, at 6:45 PM, Marcus Sandri <<a href="mailto:mwws55@gmail.com" target="_blank">mwws55@gmail.com</a>> wrote:<br>
<br>
> Hello,<br>
><br>
>        I've working with MPTCP protocol and I need access the OPTIONS field from TCP protocol. How can I access the OPTIONS field, using tcp_opt class?<br>
><br>
><br>
><br>
> cheers,<br>
> marcus.<br>
<br>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>