Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: [Wireshark-dev] LUA TCP protocol dissector

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Christer Palm <hcgpalm@xxxxxxxxx>
Date: Sun, 03 Feb 2008 16:20:53 +0100

Hi,

First of all you should know that I'm new to wireshark development, so please forgive me if any of this doesn't make sense.

I'm trying to slap together a quick and dirty dissector for helping me out in debugging a proprietary protocol. I also need the dissector to run on both linux and windows, but I don't have access to the windows development environment.

Thus, I've been toying around with a dissector written in LUA, which appears to be a perfect match for my needs.

The LUA stuff is quite impressive and I've got everything to mostly work. However, I have run into a fundamental problem - the protocol is TCP based, and as such I need to at least be able to keep some state on a conversation level.

It seems that there is no way to access the two recommended (in README.developer) methods of reassembling TCP PDU:s, i.e. tcp_dissect_pdus() or the pinfo->desegment_offset/len stuff.

Neither does it seem to be a LUA API support for any of the conversation stuff in wireshark.

I've been experimenting with keeping my own state in a frame-indexed LUA table, which works fine for keeping state for a given frame, but I haven't been able to access the tcp.continuation_to field (I always get nil reading it), which I need to get to the header frame entry.

Any ideas/tricks that can be used to get around this?


Also, I have found some other minor problems that might be worth reporting:

- TvbRange.len doesn't seem to work for some reason. As a workaround I use TvbRange:bytes():len(). - There's no equivalent to tvb_get_stringz(), although it's easy enough to code your own one.


Regards,
--
Christer Palm

  • Follow-Ups:
    • Re: [Wireshark-dev] LUA TCP protocol dissector
      • From: Jaap Keuter
  • Prev by Date: Re: [Wireshark-dev] build failure
  • Next by Date: [Wireshark-dev] Problem to decode LDAP packets
  • Previous by thread: Re: [Wireshark-dev] How should we solve bug #2202
  • Next by thread: Re: [Wireshark-dev] LUA TCP protocol dissector
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation