Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wslua_file_common.h
Go to the documentation of this file.
1
16/* See wslua_file_common.c for details */
17
18#include "wslua.h"
20#include <wiretap/wtap_module.h>
21
22/* this is way overkill for this one member, but in case we need to add
23 more in the future, the plumbing will be here */
30
31/* create and set the wtap->priv private data for the file instance */
32
39extern void create_wth_priv(lua_State* L, wtap *wth);
40
41/* gets the private data table from wtap */
42
50extern int get_wth_priv_table_ref(lua_State* L, wtap *wth);
51
61extern int set_wth_priv_table_ref(lua_State* L, wtap *wth);
62
71extern void remove_wth_priv(lua_State* L, wtap *wth);
72
81extern void create_wdh_priv(lua_State* L, wtap_dumper *wdh);
82
89extern int get_wdh_priv_table_ref(lua_State* L, wtap_dumper *wdh);
90
100extern int set_wdh_priv_table_ref(lua_State* L, wtap_dumper *wdh);
101
110extern void remove_wdh_priv(lua_State* L, wtap_dumper *wdh);
111
112/* implemented in other c files than wslua_file_common.c */
113
122extern CaptureInfo* push_CaptureInfo(lua_State* L, wtap *wth, const bool first_time);
123
131extern CaptureInfoConst* push_CaptureInfoConst(lua_State* L, wtap_dumper *wdh);
132
140extern File* push_File(lua_State* L, FILE_T ft);
141
149extern File* push_Wdh(lua_State* L, wtap_dumper *wdh);
150
158extern FrameInfo* push_FrameInfo(lua_State* L, wtap_rec *rec);
159
168extern FrameInfoConst* push_FrameInfoConst(lua_State* L, const wtap_rec *rec, const uint8_t *pd);
169
170
171/*
172 * Editor modelines - https://www.wireshark.org/tools/modelines.html
173 *
174 * Local variables:
175 * c-basic-offset: 4
176 * tab-width: 8
177 * indent-tabs-mode: nil
178 * End:
179 *
180 * vi: set shiftwidth=4 tabstop=8 expandtab:
181 * :indentSize=4:tabSize=8:noTabs=true:
182 */
Holds private Lua-managed state for a file handler instance; structured for extensibility should addi...
Definition wslua_file_common.h:27
int table_ref
Definition wslua_file_common.h:28
Wraps capture file metadata for access from the Lua scripting environment.
Definition wslua.h:381
Wraps a read-only wtap_rec and its associated raw packet data for access from the Lua scripting envir...
Definition wslua.h:398
Wraps a wtap file handle or wtap_dumper for read/write access from the Lua scripting environment.
Definition wslua.h:369
Wraps a wtap_rec for access from the Lua scripting environment, tracking validity.
Definition wslua.h:390
Wiretap dumper handle and associated state.
Definition wtap_module.h:163
Definition file_wrappers.c:96
Definition wtap.h:1540
Definition wtap_module.h:58
CaptureInfo * push_CaptureInfo(lua_State *L, wtap *wth, const bool first_time)
Pushes a CaptureInfo object onto the Lua stack.
Definition wslua_capture_info.c:38
struct _file_priv_t file_priv_t
Holds private Lua-managed state for a file handler instance; structured for extensibility should addi...
void remove_wdh_priv(lua_State *L, wtap_dumper *wdh)
Removes private data associated with a wtap_dumper.
Definition wslua_file_common.c:171
void create_wdh_priv(lua_State *L, wtap_dumper *wdh)
Creates private data for a wtap_dumper structure.
Definition wslua_file_common.c:110
int get_wth_priv_table_ref(lua_State *L, wtap *wth)
Retrieves the private data table reference from a wtap structure.
Definition wslua_file_common.c:46
void create_wth_priv(lua_State *L, wtap *wth)
Creates private data for a wtap structure.
Definition wslua_file_common.c:33
int set_wth_priv_table_ref(lua_State *L, wtap *wth)
Sets the private data table reference for a wtap structure.
Definition wslua_file_common.c:62
int get_wdh_priv_table_ref(lua_State *L, wtap_dumper *wdh)
Retrieves the private data table reference from a wtap_dumper structure.
Definition wslua_file_common.c:123
File * push_File(lua_State *L, FILE_T ft)
Pushes a File object onto the Lua stack.
Definition wslua_file.c:87
CaptureInfoConst * push_CaptureInfoConst(lua_State *L, wtap_dumper *wdh)
Pushes a CaptureInfoConst object onto the Lua stack.
Definition wslua_capture_info.c:322
File * push_Wdh(lua_State *L, wtap_dumper *wdh)
Pushes a wtap_dumper object to Lua.
Definition wslua_file.c:95
void remove_wth_priv(lua_State *L, wtap *wth)
Removes private data associated with a wtap structure.
Definition wslua_file_common.c:94
int set_wdh_priv_table_ref(lua_State *L, wtap_dumper *wdh)
Set or remove a Lua table reference in the wtap_dumper's private data.
Definition wslua_file_common.c:139
FrameInfoConst * push_FrameInfoConst(lua_State *L, const wtap_rec *rec, const uint8_t *pd)
Pushes a FrameInfoConst object onto the Lua stack.
Definition wslua_frame_info.c:342
FrameInfo * push_FrameInfo(lua_State *L, wtap_rec *rec)
Pushes a FrameInfo object onto the Lua stack.
Definition wslua_frame_info.c:43