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

How to use “require” function by lua in wireshark?

0

I wrote a Dissector by lua and I wrote two modules:"common.lua" and "main.lua". In init.lua file,I use dofile(DATA_DIR.."main.lua"). In main.lua,I use "local common = require("common");". main.lua and common.lua are in the same folder. But when I open wireshark,it's error.This error message:"module 'common' not found: no field package.preload['common'] no file '/usr/local/share/lua/5.2/common.lua' no file '/usr/local/share/lua/5.2/common/init.lua' no file '/usr/local/lib/lua/5.2/common.lua' no file '/usr/local/lib/lua/5.2/common/init.lua' no file './common.lua' no file '/usr/local/lib/lua/5.2/common.so' no file '/usr/local/lib/lua/5.2/loadall.so' no file './common.so'"

Is that "require" function can't use in wireshark?

What should I do?

asked 04 Feb '15, 00:02

fayn's gravatar image

fayn
6112
accept rate: 0%


One Answer:

0

answered 04 Feb '15, 01:43

izopizo's gravatar image

izopizo
2024714
accept rate: 0%