This file is indexed.

/usr/share/doc/wireshark-doc/wsdg_html_chunked/wsluarm_modules.html is in wireshark-doc 2.0.2+ga16e22e-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 11. Wireshark&#8217;s Lua API Reference Manual</title><link rel="stylesheet" type="text/css" href="ws.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Wireshark Developer&#8217;s Guide"><link rel="up" href="PartDevelopment.html" title="Part II. Wireshark Development"><link rel="prev" href="wslua_tap_example.html" title="10.3. Example of Listener written in Lua"><link rel="next" href="lua_module_Field.html" title="11.2. Obtaining dissection data"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Wireshark&#8217;s Lua API Reference Manual</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="wslua_tap_example.html">Prev</a> </td><th width="60%" align="center">Part II. Wireshark Development</th><td width="20%" align="right"> <a accesskey="n" href="lua_module_Field.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="wsluarm_modules"></a>Chapter 11. Wireshark&#8217;s Lua API Reference Manual</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="wsluarm_modules.html#lua_module_Dumper">11.1. Saving capture files</a></span></dt><dd><dl><dt><span class="section"><a href="wsluarm_modules.html#lua_class_Dumper">11.1.1. Dumper</a></span></dt><dt><span class="section"><a href="wsluarm_modules.html#lua_class_PseudoHeader">11.1.2. PseudoHeader</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Field.html">11.2. Obtaining dissection data</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Field.html#lua_class_Field">11.2.1. Field</a></span></dt><dt><span class="section"><a href="lua_module_Field.html#lua_class_FieldInfo">11.2.2. FieldInfo</a></span></dt><dt><span class="section"><a href="lua_module_Field.html#global_functions_Field">11.2.3. Global Functions</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Gui.html">11.3. GUI support</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Gui.html#lua_class_ProgDlg">11.3.1. ProgDlg</a></span></dt><dt><span class="section"><a href="lua_module_Gui.html#lua_class_TextWindow">11.3.2. TextWindow</a></span></dt><dt><span class="section"><a href="lua_module_Gui.html#global_functions_Gui">11.3.3. Global Functions</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Listener.html">11.4. Post-dissection packet analysis</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Listener.html#lua_class_Listener">11.4.1. Listener</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Pinfo.html">11.5. Obtaining packet information</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Pinfo.html#lua_class_Address">11.5.1. Address</a></span></dt><dt><span class="section"><a href="lua_module_Pinfo.html#lua_class_Column">11.5.2. Column</a></span></dt><dt><span class="section"><a href="lua_module_Pinfo.html#lua_class_Columns">11.5.3. Columns</a></span></dt><dt><span class="section"><a href="lua_module_Pinfo.html#lua_class_NSTime">11.5.4. NSTime</a></span></dt><dt><span class="section"><a href="lua_module_Pinfo.html#lua_class_Pinfo">11.5.5. Pinfo</a></span></dt><dt><span class="section"><a href="lua_module_Pinfo.html#lua_class_PrivateTable">11.5.6. PrivateTable</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Proto.html">11.6. Functions for new protocols and dissectors</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Proto.html#lua_class_Dissector">11.6.1. Dissector</a></span></dt><dt><span class="section"><a href="lua_module_Proto.html#lua_class_DissectorTable">11.6.2. DissectorTable</a></span></dt><dt><span class="section"><a href="lua_module_Proto.html#lua_class_Pref">11.6.3. Pref</a></span></dt><dt><span class="section"><a href="lua_module_Proto.html#lua_class_Prefs">11.6.4. Prefs</a></span></dt><dt><span class="section"><a href="lua_module_Proto.html#lua_class_Proto">11.6.5. Proto</a></span></dt><dt><span class="section"><a href="lua_module_Proto.html#lua_class_ProtoExpert">11.6.6. ProtoExpert</a></span></dt><dt><span class="section"><a href="lua_module_Proto.html#lua_class_ProtoField">11.6.7. ProtoField</a></span></dt><dt><span class="section"><a href="lua_module_Proto.html#global_functions_Proto">11.6.8. Global Functions</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Tree.html">11.7. Adding information to the dissection tree</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Tree.html#lua_class_TreeItem">11.7.1. TreeItem</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Tvb.html">11.8. Functions for handling packet data</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Tvb.html#lua_class_ByteArray">11.8.1. ByteArray</a></span></dt><dt><span class="section"><a href="lua_module_Tvb.html#lua_class_Tvb">11.8.2. Tvb</a></span></dt><dt><span class="section"><a href="lua_module_Tvb.html#lua_class_TvbRange">11.8.3. TvbRange</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_File.html">11.9. Custom file format reading/writing</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_File.html#lua_class_CaptureInfo">11.9.1. CaptureInfo</a></span></dt><dt><span class="section"><a href="lua_module_File.html#lua_class_CaptureInfoConst">11.9.2. CaptureInfoConst</a></span></dt><dt><span class="section"><a href="lua_module_File.html#lua_class_File">11.9.3. File</a></span></dt><dt><span class="section"><a href="lua_module_File.html#lua_class_FileHandler">11.9.4. FileHandler</a></span></dt><dt><span class="section"><a href="lua_module_File.html#lua_class_FrameInfo">11.9.5. FrameInfo</a></span></dt><dt><span class="section"><a href="lua_module_File.html#lua_class_FrameInfoConst">11.9.6. FrameInfoConst</a></span></dt><dt><span class="section"><a href="lua_module_File.html#global_functions_File">11.9.7. Global Functions</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Dir.html">11.10. Directory handling functions</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Dir.html#lua_class_Dir">11.10.1. Dir</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Utility.html">11.11. Utility Functions</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Utility.html#global_functions_Utility">11.11.1. Global Functions</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Int64.html">11.12. Handling 64-bit Integers</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Int64.html#lua_class_Int64">11.12.1. Int64</a></span></dt><dt><span class="section"><a href="lua_module_Int64.html#lua_class_UInt64">11.12.2. UInt64</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_Struct.html">11.13. Binary encode/decode support</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_Struct.html#lua_class_Struct">11.13.1. Struct</a></span></dt></dl></dd><dt><span class="section"><a href="lua_module_GRegex.html">11.14. GLib Regular Expressions</a></span></dt><dd><dl><dt><span class="section"><a href="lua_module_GRegex.html#lua_class_GRegex">11.14.1. GRegex</a></span></dt></dl></dd></dl></div><p>This Part of the User Guide describes the Wireshark specific functions in the embedded Lua.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="lua_module_Dumper"></a>11.1. Saving capture files</h2></div></div></div><p>The classes/functions defined in this module are for using a <code class="literal">Dumper</code> object to
make Wireshark save a capture file to disk. <code class="literal">Dumper</code> represents Wireshark&#8217;s built-in
file format writers (see the <code class="literal">wtap_filetypes</code> table in <code class="literal">init.lua</code>).</p><p>To have a Lua script create its own file format writer, see the chapter titled
"Custom file format reading/writing".</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="lua_class_Dumper"></a>11.1.1. Dumper</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_Dumper_new_filename___filetype____encap__"></a>11.1.1.1. Dumper.new(filename, [filetype], [encap])</h4></div></div></div><p>Creates a file to write packets.
<code class="literal">Dumper:new_for_current()</code> will probably be a better choice.</p><h5><a name="_arguments"></a>Arguments</h5><div class="variablelist"><dl class="variablelist"><dt><span class="term">
filename
</span></dt><dd>
The name of the capture file to be created.
</dd><dt><span class="term">
filetype (optional)
</span></dt><dd>
The type of the file to be created - a number entry from the <code class="literal">wtap_filetypes</code> table in <code class="literal">init.lua</code>.
</dd><dt><span class="term">
encap (optional)
</span></dt><dd>
The encapsulation to be used in the file to be created - a number entry from the <code class="literal">wtap_encaps</code> table in <code class="literal">init.lua</code>.
</dd></dl></div><h5><a name="_returns"></a>Returns</h5><p>The newly created Dumper object</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_dumper_close__"></a>11.1.1.2. dumper:close()</h4></div></div></div><p>Closes a dumper.</p><h5><a name="_errors"></a>Errors</h5><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Cannot operate on a closed dumper

</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_dumper_flush__"></a>11.1.1.3. dumper:flush()</h4></div></div></div><p>Writes all unsaved data of a dumper to the disk.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_dumper_dump_timestamp__pseudoheader__bytearray_"></a>11.1.1.4. dumper:dump(timestamp, pseudoheader, bytearray)</h4></div></div></div><p>Dumps an arbitrary packet.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="wsdg_graphics/note.svg"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Dumper:dump_current() will fit best in most cases.</p></td></tr></table></div><h5><a name="_arguments_2"></a>Arguments</h5><div class="variablelist"><dl class="variablelist"><dt><span class="term">
timestamp
</span></dt><dd>
The absolute timestamp the packet will have.
</dd><dt><span class="term">
pseudoheader
</span></dt><dd>
The <code class="literal">PseudoHeader</code> to use.
</dd><dt><span class="term">
bytearray
</span></dt><dd>
The data to be saved
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_dumper_new_for_current__filetype__"></a>11.1.1.5. dumper:new_for_current([filetype])</h4></div></div></div><p>Creates a capture file using the same encapsulation as the one of the current packet.</p><h5><a name="_arguments_3"></a>Arguments</h5><div class="variablelist"><dl class="variablelist"><dt><span class="term">
filetype (optional)
</span></dt><dd>
The file type. Defaults to pcap.
</dd></dl></div><h5><a name="_returns_2"></a>Returns</h5><p>The newly created Dumper Object</p><h5><a name="_errors_2"></a>Errors</h5><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Cannot be used outside a tap or a dissector

</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_dumper_dump_current__"></a>11.1.1.6. dumper:dump_current()</h4></div></div></div><p>Dumps the current packet as it is.</p><h5><a name="_errors_3"></a>Errors</h5><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Cannot be used outside a tap or a dissector

</li></ul></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="lua_class_PseudoHeader"></a>11.1.2. PseudoHeader</h3></div></div></div><p>A pseudoheader to be used to save captured frames.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_PseudoHeader_none__"></a>11.1.2.1. PseudoHeader.none()</h4></div></div></div><p>Creates a "no" pseudoheader.</p><h5><a name="_returns_3"></a>Returns</h5><p>A null pseudoheader</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_PseudoHeader_eth__fcslen__"></a>11.1.2.2. PseudoHeader.eth([fcslen])</h4></div></div></div><p>Creates an ethernet pseudoheader.</p><h5><a name="_arguments_4"></a>Arguments</h5><div class="variablelist"><dl class="variablelist"><dt><span class="term">
fcslen (optional)
</span></dt><dd>
The fcs length
</dd></dl></div><h5><a name="_returns_4"></a>Returns</h5><p>The ethernet pseudoheader</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_PseudoHeader_atm__aal____vpi____vci____channel____cells____aal5u2u____aal5len__"></a>11.1.2.3. PseudoHeader.atm([aal], [vpi], [vci], [channel], [cells], [aal5u2u], [aal5len])</h4></div></div></div><p>Creates an ATM pseudoheader.</p><h5><a name="_arguments_5"></a>Arguments</h5><div class="variablelist"><dl class="variablelist"><dt><span class="term">
aal (optional)
</span></dt><dd>
AAL number
</dd><dt><span class="term">
vpi (optional)
</span></dt><dd>
VPI
</dd><dt><span class="term">
vci (optional)
</span></dt><dd>
VCI
</dd><dt><span class="term">
channel (optional)
</span></dt><dd>
Channel
</dd><dt><span class="term">
cells (optional)
</span></dt><dd>
Number of cells in the PDU
</dd><dt><span class="term">
aal5u2u (optional)
</span></dt><dd>
AAL5 User to User indicator
</dd><dt><span class="term">
aal5len (optional)
</span></dt><dd>
AAL5 Len
</dd></dl></div><h5><a name="_returns_5"></a>Returns</h5><p>The ATM pseudoheader</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="lua_fn_PseudoHeader_mtp2__sent____annexa____linknum__"></a>11.1.2.4. PseudoHeader.mtp2([sent], [annexa], [linknum])</h4></div></div></div><p>Creates an MTP2 PseudoHeader.</p><h5><a name="_arguments_6"></a>Arguments</h5><div class="variablelist"><dl class="variablelist"><dt><span class="term">
sent (optional)
</span></dt><dd>
True if the packet is sent, False if received.
</dd><dt><span class="term">
annexa (optional)
</span></dt><dd>
True if annex A is used.
</dd><dt><span class="term">
linknum (optional)
</span></dt><dd>
Link Number.
</dd></dl></div><h5><a name="_returns_6"></a>Returns</h5><p>The MTP2 pseudoheader</p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="wslua_tap_example.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="PartDevelopment.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="lua_module_Field.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">10.3. Example of Listener written in Lua </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 11.2. Obtaining dissection data</td></tr></table></div></body></html>