This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

the function init_listener

0

Hi, I'm new to Lua and I want to know the statement ( init_Listener() ) that written at the end of the function init_Listener, what is the benefit from it??

asked 04 Sep '12, 01:36

Leena's gravatar image

Leena
51171821
accept rate: 0%


One Answer:

0

init_listener() is probably what you have seen in the following example:

http://wiki.wireshark.org/Lua/Examples

In that example it's just a self declared function in the code that will called as soon as the Lua file gets loaded. You don't have to wrap the Lua Listener code into its own funtion, as done in the example. It's just one way. See the other Lua Examples for different ways.

Regards
Kurt

answered 04 Sep '12, 02:24

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%