11.15. Utility Functions

11.15.1. Global Functions

11.15.1.1. get_version()

Gets a string of the Wireshark version.

11.15.1.1.1. Returns

version string

11.15.1.2. format_date(timestamp)

Formats an absolute timestamp into a human readable date.

11.15.1.2.1. Arguments
timestamp

A timestamp value to convert.

11.15.1.2.2. Returns

A string with the formated date

11.15.1.3. format_time(timestamp)

Formats a relative timestamp in a human readable form.

11.15.1.3.1. Arguments
timestamp

A timestamp value to convert.

11.15.1.3.2. Returns

A string with the formated time

11.15.1.4. report_failure(text)

Reports a failure to the user.

11.15.1.4.1. Arguments
text

Message text to report.

11.15.1.5. critical(...)

Will add a log entry with critical severity.

11.15.1.5.1. Arguments
...

Objects to be printed

11.15.1.6. warn(...)

Will add a log entry with warn severity.

11.15.1.6.1. Arguments
...

Objects to be printed

11.15.1.7. message(...)

Will add a log entry with message severity.

11.15.1.7.1. Arguments
...

Objects to be printed

11.15.1.8. info(...)

Will add a log entry with info severity.

11.15.1.8.1. Arguments
...

Objects to be printed

11.15.1.9. debug(...)

Will add a log entry with debug severity.

11.15.1.9.1. Arguments
...

Objects to be printed

11.15.1.10. loadfile(filename)

Lua's loadfile() has been modified so that if a file does not exist in the current directory it will look for it in wireshark's user and system directories.

11.15.1.10.1. Arguments
filename

Name of the file to be loaded.

11.15.1.11. dofile(filename)

Lua's dofile() has been modified so that if a file does not exist in the current directory it will look for it in wireshark's user and system directories.

11.15.1.11.1. Arguments
filename

Name of the file to be run.

11.15.1.12. register_stat_cmd_arg(argument, [action])

Register a function to handle a -z option

11.15.1.12.1. Arguments
argument

Argument

action (optional)

Action