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 builds.

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

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

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 . 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.

This site uses Akismet to reduce spam. Learn how your comment data is processed.