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

LUA 60 upvalues limit in function [Solved]

0

Hi all,

We use some LUA files to decode our specifics frames. Some of or LUA have a lot of values (more than 60) in the function (dissector). Wireshark displays me an alert message before launching "Function at line 141 has more than 60 upvalues"

here an example ok LUA function :

--Dissector
function p_omap_Global_Counters.dissector(buf, pkt, root)
--Set info
pkt.cols.info:append(" : " .. p_omap_Global_Counters.name)

--Root
local Global_Counters_tree = root:add(p_omap_Global_Counters, buf(0))
Global_Counters_tree:add(f_counter_arrayasync_data_sync_unshared_data_dropped_, buf(0, 4))
Global_Counters_tree:add(f_counter_arrayccp_com_safe_rx_message_dropped_, buf(4, 4))
Global_Counters_tree:add(f_counter_arrayccp_com_safe_rx_unkown_message_dropped_, buf(8, 4))

etc…

Is it possible to change this limitation ? (We use version 1.10.3) thx for your help Mickaël

asked 16 Oct ‘15, 00:52

Micka%C3%ABl's gravatar image

Mickaël
1112
accept rate: 0%

edited 16 Oct ‘15, 06:29


One Answer:

0

The pb came from the number of local variable declared (>60) I solved it by declaring all my local variable into one array :

--Protocol
local omapVars =
{
   myVar1example = ...,
   myVar2example = ...,
       ....
    }

answered 16 Oct '15, 06:28

Micka%C3%ABl's gravatar image

Mickaël
1112
accept rate: 0%