First time here? Check out the FAQ!

Ask Your Question
0

Facing error during loading of lua script

asked Dec 19 '3

ofc gravatar image

updated Dec 19 '3

grahamb gravatar image

Hi,

I am facing below error while loading my lua script :

Lua:Error during loading: .lua : 809: No such int32_t function/proper for object type 'ProtoFiled'
stack traceback:
 [C]: in function '_index' *.lua:809 in main chunk.

Below is highlighted line is 809:

local logControlresp = {
      LogControlresp = "LOGCONTRLRESPONSEStruct",
      **transId        = ProtoField.int32_t("RSYS_FAPI.logControlresp.transId", "transId"),**
      nStatus        = ProtoField.int32_t("RSYS_FAPI.logControlresp.nStatus", "paramCnt"),
}
logControlresp.transId,
logControlresp.nStatus,

function addPhyLogCtrlRespToTree(tvbuf, tree, offset, payLen, endianness)

    local info
    local PhyLogCtrlRespTree
    info = tvbuf:range(offset, payLen)
    PhyLogCtrlRespTree = tree:add(info, logControlresp.LogControlresp)
    info = tvbuf:range(offset, 4)
    PhyLogCtrlRespTree:add_packet_field(logControlresp.transId, info, endianness)
    offset = offset + 4
    info = tvbuf:range(offset, 1)
    PhyLogCtrlRespTree:add_packet_field(logControlresp.nStatus, info, endianness)
    offset = offset + 1


    offset = offset + THREE_BYTES_RESERVED    
end

Please help me to solve this error I am new to lua parser scripting and not getting solution to this online

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered Dec 19 '3

Chuckc gravatar image

The _t types are for "C" code. There are examples of this in the Wireshark Developer’s Guide.

int32_t tag;
int32_t len1;

For lua code, see section 11.3.7. ProtoField:

11.3.7.11. ProtoField.int32(abbr, [name], [base], [valuestring], [mask], [desc])

Creates a ProtoField of a signed 32-bit integer.

local logControlresp = {
      LogControlresp = "LOGCONTRLRESPONSEStruct",
      transId        = ProtoField.int32("RSYS_FAPI.logControlresp.transId", "transId"),
      nStatus        = ProtoField.int32("RSYS_FAPI.logControlresp.nStatus", "paramCnt"),
}
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: Dec 19 '3

Seen: 599 times

Last updated: Dec 19 '23