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 */
24typedef struct _file_priv_t {
25 int table_ref;
27
28/* create and set the wtap->priv private data for the file instance */
29
36extern void create_wth_priv(lua_State* L, wtap *wth);
37
38/* gets the private data table from wtap */
39
47extern int get_wth_priv_table_ref(lua_State* L, wtap *wth);
48
49/* sets the private data to wtap - the table is presumed on top of stack */
50extern int set_wth_priv_table_ref(lua_State* L, wtap *wth);
51
52/* remove, deref, and free the wtap->priv data */
53extern void remove_wth_priv(lua_State* L, wtap *wth);
54
55/* create and set the wtap_dumper->priv private data for the file instance */
56extern void create_wdh_priv(lua_State* L, wtap_dumper *wdh);
57
64extern int get_wdh_priv_table_ref(lua_State* L, wtap_dumper *wdh);
65
66/* sets the private data to wtap - the table is presumed on top of stack */
67
75extern int set_wdh_priv_table_ref(lua_State* L, wtap_dumper *wdh);
76
83/* remove and deref the wtap_dumper->priv data */
84extern void remove_wdh_priv(lua_State* L, wtap_dumper *wdh);
85
86/* implemented in other c files than wslua_file_common.c */
87
96extern CaptureInfo* push_CaptureInfo(lua_State* L, wtap *wth, const bool first_time);
97
105extern CaptureInfoConst* push_CaptureInfoConst(lua_State* L, wtap_dumper *wdh);
106
114extern File* push_File(lua_State* L, FILE_T ft);
115
123extern File* push_Wdh(lua_State* L, wtap_dumper *wdh);
124
132extern FrameInfo* push_FrameInfo(lua_State* L, wtap_rec *rec);
133
142extern FrameInfoConst* push_FrameInfoConst(lua_State* L, const wtap_rec *rec, const uint8_t *pd);
143
144
145/*
146 * Editor modelines - https://www.wireshark.org/tools/modelines.html
147 *
148 * Local variables:
149 * c-basic-offset: 4
150 * tab-width: 8
151 * indent-tabs-mode: nil
152 * End:
153 *
154 * vi: set shiftwidth=4 tabstop=8 expandtab:
155 * :indentSize=4:tabSize=8:noTabs=true:
156 */
Definition wslua_file_common.h:24
Definition wslua.h:311
Definition wslua.h:322
Definition wslua.h:304
Definition wslua.h:317
Wiretap dumper handle and associated state.
Definition wtap_module.h:163
Definition file_wrappers.c:96
Definition wtap.h:1512
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
void remove_wdh_priv(lua_State *L, wtap_dumper *wdh)
Removes private data associated with a wtap_dumper.
Definition wslua_file_common.c:171
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 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
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