Enabling Lua in Wireshark for custom dissectors

Enabling Lua in Wireshark for custom dissectors

Joel has dropped me an email and asked if Lua (which should never, ever be LUA) could be enabled in the Wireshark builds.

I wanted to thank you for your Centos 7 repository.  Your Wireshark package has saved me a lot of time!

I have a request: on your next Wireshark build, would you enable the “Lua” option?  This would enable user-defined packet dissectors, an extremely useful option for those of us doing development.

Lua in Wireshark allows you to code your own packet dissectors, which means you can do your own protocol analysis and development. Have a look at the Wireshark wiki for examples on Lua dissectors.

Yes it can!

Firstly, we need to add the Lua development libraries to the build system.

install lua-devel

Unlike some packages, Wireshark actually builds the .spec file that drives the rpmbuild process itself. This means we don't need to break the rpmbuild process into parts, editing the .spec file to add the new build options, and then building and packaging the files.

Instead, we just need to alter the configure command, so that we can generate the proper elements already in the source code and make process. So we need to run ./configure --with-lua, rather than plain ./configure to make the build.

Now we follow the remaining steps in the Building Wireshark 2.4.0 for CentOS 7 post. Sign the .rpm files and update the repository on the .

So the next time you run yum update, if you've added the repository from Wireshark 2.4 on CentOS 7 (TL;DR version), you'll find the ability to use Lua dissectors in Wireshark.

See this screenshot, in which I've cunningly highlighted the point at which it shows we're now building with the Lua dissectors.

I did actually have to dig into to .spec file to adjust the Release value, otherwise it would be difficult for yum to recognise a new version of the rpm was available for download.
John Dixon

John Dixon is the Principal Consultant of thirteen-ten nanometre networks Ltd, based in Wiltshire, United Kingdom. He has a wide range of experience, (including, but not limited to) operating, designing and optimizing systems and networks for customers from global to domestic in scale. He has worked with many international brands to implement both data centres and wide-area networks across a range of industries. He is currently supporting a major SD-WAN vendor on the implementation of an environment supporting a major global fast-food chain.

Comments are closed.