Skip to content
Snippets Groups Projects

wslua: Expose conversation API

Merged Aloz1 requested to merge Aloz1/wireshark:add-lua-conversations into master

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

Merge request pipeline #1654359892 skipped

Merge request pipeline skipped for 3c2bc78b

Merged by AndersBromanAndersBroman 1 month ago (Feb 4, 2025 5:29am UTC)

Loading

Pipeline #1655391140 passed

Pipeline passed for 3c2bc78b on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading