wslua: Expose conversation API
This merge request resolves #15396 (closed). A new Conversation object has been added that exposes the underlying C 'conversation' api.
The API is relatively complete, but for the sake of simplicity, I have not exposed any of the '_deinterlacer' functions, nor have I exposed 'elements' functions. These can come later.
For now, the extent of the API is as follows:
-- Functions to fetch conversations
local conv1 = Conversation.find_with_pinfo(pinfo, [options], [bool_create])
local conv2 = Conversation.find_by_id(frame_id, convtypes.<CONV_TYPE>, id, [bool_create])
local conv3 = Conversation.find(frame_id, convtypes.<CONV_TYPE>, addr1, port1, [addr2], [port2], [bool_create])
-- This last one is equivalent to calling Conversation.find_with_pinfo(pinfo)
local conv4 = pinfo.conversation
-- Set data
conv1[proto] = "asdf"
conv2[proto] = {"asdf": 123}
-- Get data
local data = conv3[proto]
-- Clear data
conv3[proto] = nil
-- Set dissector (equivalent to pinfo.conversation = <dissector>)
conv1.dissector = <dissector>
Edited by Aloz1
Merge request reports
Activity
Please register or sign in to reply