Paul Grinberg
Paul Grinberg

Reputation: 1477

Debugging wireshark dissector

I am writing my first wireshark dissector. I am writing it in Lua, using this as an example. On the second page it says that I can use functions like critical(), warn(), debug() to help debug the code. However, when I add even the simplest

critical("foo")

wireshark complains that

attempt to call global 'critical' (a nil value)

I can't seem to figure out how to use these utility functions. What am I missing?

UPDATE: In case it is relevant, I am running Wireshark 3.0.0

Upvotes: 1

Views: 1918

Answers (1)

Mika Sundland
Mika Sundland

Reputation: 18979

I made that tutorial.

It looks like the logging functions were removed from Wireshark in 3.0 (release notes):

Lua: the various logging functions (debug, info, message, warn and critical) have been removed. Use the print function instead for debugging purposes.

So use print() instead:

print("foo")

Upvotes: 6

Related Questions