Wireshark-commits: [Wireshark-commits] master 04d9501: Add capture file reader/writer support for L
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=04d950130624c14ac8af39c621f69851d8088ed6
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
04d9501 by Michael Mann (mmann78@xxxxxxxxxxxx):
Add capture file reader/writer support for Lua so scripts can implement new capture file formats.
This enables a Lua script to implement a brand new capture file format reader/writer, so that for example one could write a script to read from vendor-specific "logs" of packets, and show them as normal packets in wireshark.
Change-Id: Id394edfffa94529f39789844c382b7ab6cc2d814
Reviewed-on: https://code.wireshark.org/review/431
Reviewed-by: Hadriel Kaplan <hadrielk@xxxxxxxxx>
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from d832cb1 Fix OS-X compilation broken by gc354675
adds 04d9501 Add capture file reader/writer support for Lua so scripts can implement new capture file formats.
Summary of changes:
docbook/CMakeLists.txt | 1 +
docbook/Makefile.common | 1 +
docbook/make-wsluarm.pl | 8 +
docbook/user-guide.xml | 1 +
docbook/wsluarm.xml | 1 +
epan/wslua/CMakeLists.txt | 1 +
epan/wslua/Makefile.am | 2 +
epan/wslua/Makefile.nmake | 2 +
epan/wslua/make-init-lua.pl | 20 +
epan/wslua/template-init.lua | 4 +
epan/wslua/wslua.h | 101 +-
epan/wslua/wslua_file.c | 2134 ++++++++++++++++++++++++++++++++++++++++++
epan/wslua/wslua_util.c | 21 +-
test/captures/sip.pcapng | Bin 0 -> 3696 bytes
test/captures/sipmsg.log | 136 +++
test/lua/acme_file.lua | 1365 +++++++++++++++++++++++++++
test/lua/pcap_file.lua | 548 +++++++++++
test/suite-wslua.sh | 98 ++
wiretap/file_access.c | 496 +++++++---
wiretap/file_wrappers.c | 47 +
wiretap/file_wrappers.h | 5 +-
wiretap/wtap-int.h | 13 +-
wiretap/wtap.h | 40 +-
23 files changed, 4874 insertions(+), 171 deletions(-)
create mode 100644 epan/wslua/wslua_file.c
create mode 100644 test/captures/sip.pcapng
create mode 100644 test/captures/sipmsg.log
create mode 100644 test/lua/acme_file.lua
create mode 100644 test/lua/pcap_file.lua