11.7. GUI support

11.7.1. ProgDlg

Manages a progress bar dialog. ProgDlg.new([title], [task])

Creates a new ProgDlg progress dialog. Arguments
title (optional)

Title of the new window, defaults to "Progress".

task (optional)

Current task, defaults to "". Returns

The newly created ProgDlg object. progdlg:update(progress, [task])

Appends text. Arguments

Part done ( e.g. 0.75 ).

task (optional)

Current task, defaults to "". Errors
  • GUI not available

  • Cannot be called for something not a ProgDlg

  • Progress value out of range (must be between 0.0 and 1.0) progdlg:stopped()

Checks whether the user has pressed the stop button. Returns

true if the user has asked to stop the progress. progdlg:close()

Closes the progress dialog. Errors
  • GUI not available

11.7.2. TextWindow

Manages a text window. TextWindow.new([title])

Creates a new TextWindow text window. Arguments
title (optional)

Title of the new window. Returns

The newly created TextWindow object. Errors
  • GUI not available textwindow:set_atclose(action)

Set the function that will be called when the text window closes. Arguments

A Lua function to be executed when the user closes the text window. Returns

The TextWindow object. Errors
  • GUI not available textwindow:set(text)

Sets the text. Arguments

The text to be used. Returns

The TextWindow object. Errors
  • GUI not available textwindow:append(text)

Appends text Arguments

The text to be appended Returns

The TextWindow object. Errors
  • GUI not available textwindow:prepend(text)

Prepends text Arguments

The text to be appended Returns

The TextWindow object. Errors
  • GUI not available textwindow:clear()

Erases all text in the window. Returns

The TextWindow object. Errors
  • GUI not available textwindow:get_text()

Get the text of the window Returns

The TextWindow's text. Errors
  • GUI not available textwindow:set_editable([editable])

Make this text window editable. Arguments
editable (optional)

A boolean flag, defaults to true. Returns

The TextWindow object. Errors
  • GUI not available textwindow:add_button(label, function)

Adds a button to the text window. Arguments

The label of the button


The Lua function to be called when clicked Returns

The TextWindow object. Errors
  • GUI not available

11.7.3. Global Functions gui_enabled()

Checks whether the GUI facility is enabled. Returns

A boolean: true if it is enabled, false if it isn't. register_menu(name, action, [group])

Register a menu item in one of the main menus. Arguments

The name of the menu item. The submenus are to be separated by '/'s. (string)


The function to be called when the menu item is invoked. (function taking no arguments and returning nothing)

group (optional)

The menu group into which the menu item is to be inserted. If omitted, defaults to MENU_STAT_GENERIC. One of:

  • MENU_STAT_UNSORTED (Statistics),

  • MENU_STAT_GENERIC (Statistics, first section),

  • MENU_STAT_CONVERSATION (Statistics/Conversation List),

  • MENU_STAT_ENDPOINT (Statistics/Endpoint List),

  • MENU_STAT_RESPONSE (Statistics/Service Response Time),

  • MENU_STAT_TELEPHONY (Telephony),




  • MENU_ANALYZE (Analyze),

  • MENU_ANALYZE_CONVERSATION (Analyze/Conversation Filter),

  • MENU_TOOLS_UNSORTED (Tools). (number) new_dialog(title, action, ...)

Pops up a new dialog Arguments

Title of the dialog's window.


Action to be performed when OK'd.


A series of strings to be used as labels of the dialog's fields. Errors
  • GUI not available

  • At least one field required

  • All fields must be strings retap_packets()

Rescan all packets and just run taps - don't reconstruct the display. copy_to_clipboard(text)

Copy a string into the clipboard. Arguments

The string to be copied into the clipboard. open_capture_file(filename, filter)

Open and display a capture file. Arguments

The name of the file to be opened.


A filter to be applied as the file gets opened. get_filter()

Get the main filter text. set_filter(text)

Set the main filter text. Arguments

The filter's text. set_color_filter_slot(row, text)

Set packet-coloring rule for the current session. Arguments

The index of the desired color in the temporary coloring rules list.


Display filter for selecting packets to be colorized. apply_filter()

Apply the filter in the main filter box. reload()

Reload the current capture file. browser_open_url(url)

Open an url in a browser. Arguments

The url. browser_open_data_file(filename)

Open a file in a browser. Arguments

The file name.