
You can read the Lua 5.3 Reference Manual Sugar for passing the object itself as an argument to the function. Then the functions func1 and func2 belongs to the table (object) a. They have no fixed size and elements can be added dynamically. Associative arrays can be indexed by both numbers and other types, such as

You can forget about thread and userdata. Strings are either single-quote or double-quote. Represents all numbers, both floating points and integers. Its types are: string, number, boolean, nil, function, userdata, thread and table.Not equal in conditionals is ~= rather than !=.Whitespace is not important like in Python. Inheritance out of the box, but they can be made by the programmer. It also has some object-oriented programming features. Lua is multi-paradigm, and supports procedural style, functional programming to some degree, and.To know the language in detail, but we must know the basics. The downside of using Lua is that the dissector will be slower than a dissector written in C.īefore we start writing the dissector, let’s go through a crash course on Lua. That is designed to be implemented as a scripting language in applications to extend their For those who are unfamiliar with Lua, it’s a very light-weight programming language Wireshark has a Lua implementation that makes it easy for people who are unfamiliar with C to writeĭissectors.

Wireshark is written in C, and dissectors for Wireshark are generally also written in C. It’s hard to tell what the various bytes in the data part represents. This is can be useful when you’re working withĪ custom protocol that Wireshark doesn’t already have a dissector for. In Wireshark, using the Lua programming language.
:max_bytes(150000):strip_icc()/008-wireshark-tutorial-4143298-13534b80059945e88759286cb3338360.jpg)
This post will explain how you can easily create protocol dissectors
