10.4. Wireshark's Lua API Reference Manual
This Part of the User Guide describes the Wireshark specific functions in the embedded Lua.
10.4.1. Saving capture files
10.4.1.1. Dumper
10.4.1.1.1. Dumper.new(filename, [filetype], [encap])
Creates a file to write packets. Dumper:new_for_current() will probably be a better choice.
10.4.1.1.1.1. Arguments
filename The name of the capture file to be created
filetype (optional) The type of the file to be created
encap (optional) The encapsulation to be used in the file to be created
10.4.1.1.1.2. Returns
The newly created Dumper object
10.4.1.1.1.3. Errors
• not every filetype handles every encap
10.4.1.1.2. dumper:close()
Closes a dumper
10.4.1.1.2.1. Errors
• Cannot operate on a closed dumper
10.4.1.1.3. dumper:flush()
Writes all unsaved data of a dumper to the disk.
10.4.1.1.4. dumper:dump(timestamp, pseudoheader, bytearray)
Dumps an arbitrary packet. Note: Dumper:dump_current() will fit best in most cases.
10.4.1.1.4.1. Arguments
timestamp The absolute timestamp the packet will have
pseudoheader The Pseudoheader to use.
bytearray the data to be saved
10.4.1.1.5. dumper:new_for_current([filetype])
Lua Support in Wireshark
196
Kommentare zu diesen Handbüchern