Now I can access those values! Thanks!
2013/12/26 Murphy McCauley <murphy.mccau...@gmail.com> > You need to get an actual instance of the tcp_opt class (stored in the > .options attribute of the TCP object). Try something like: > > packet = event.parsed > packet_tcp = packet.find("tcp") > if packet_tcp: > for opt in packet_tcp.options: > print "type:%s data:%s" % (opt.type, opt.val) > > -- Murphy > > > On Dec 26, 2013, at 5:54 AM, Marcus Sandri <mww...@gmail.com> wrote: > > Exactly, > > > But how can I access .val atributes? > I tried: > > packet = event.parsed > packet_tcp = packet.find("tcp") > if(packet_tcp): > > tcp_raw = tcp_opt.val > > > But it returns: line 29, in _handle_PacketIn > tcp_options = tcp_opt.val > AttributeError: class tcp_opt has no attribute 'val' > > It works with the tcp_opt constants, such as: EOL, SACK, etc. > > Am I doing something wrong? > > > 2013/12/26 Murphy McCauley <murphy.mccau...@gmail.com> > >> 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. >> >> -- Murphy >> >> On Dec 25, 2013, at 6:45 PM, Marcus Sandri <mww...@gmail.com> wrote: >> >> > Hello, >> > >> > 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? >> > >> > >> > >> > cheers, >> > marcus. >> >> > >