Wireshark  4.3.0
The Wireshark network protocol analyzer
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"
19 #include <wiretap/wtap_opttypes.h>
20 #include <wiretap/wtap-int.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 */
24 typedef struct _file_priv_t {
25  int table_ref;
26 } file_priv_t;
27 
28 /* create and set the wtap->priv private data for the file instance */
29 extern void create_wth_priv(lua_State* L, wtap *wth);
30 
31 /* gets the private data table from wtap */
32 extern int get_wth_priv_table_ref(lua_State* L, wtap *wth);
33 
34 /* sets the private data to wtap - the table is presumed on top of stack */
35 extern int set_wth_priv_table_ref(lua_State* L, wtap *wth);
36 
37 /* remove, deref, and free the wtap->priv data */
38 extern void remove_wth_priv(lua_State* L, wtap *wth);
39 
40 /* create and set the wtap_dumper->priv private data for the file instance */
41 extern void create_wdh_priv(lua_State* L, wtap_dumper *wdh);
42 
43 /* get the private data from wtap_dumper */
44 extern int get_wdh_priv_table_ref(lua_State* L, wtap_dumper *wdh);
45 
46 /* sets the private data to wtap - the table is presumed on top of stack */
47 extern int set_wdh_priv_table_ref(lua_State* L, wtap_dumper *wdh);
48 
49 /* remove and deref the wtap_dumper->priv data */
50 extern void remove_wdh_priv(lua_State* L, wtap_dumper *wdh);
51 
52 /* implemented in other c files than wslua_file_common.c */
53 extern CaptureInfo* push_CaptureInfo(lua_State* L, wtap *wth, const bool first_time);
54 extern CaptureInfoConst* push_CaptureInfoConst(lua_State* L, wtap_dumper *wdh);
55 extern File* push_File(lua_State* L, FILE_T ft);
56 extern File* push_Wdh(lua_State* L, wtap_dumper *wdh);
57 extern FrameInfo* push_FrameInfo(lua_State* L, wtap_rec *rec, Buffer* buf);
58 extern FrameInfoConst* push_FrameInfoConst(lua_State* L, const wtap_rec *rec, const uint8_t *pd);
59 
60 
61 /*
62  * Editor modelines - https://www.wireshark.org/tools/modelines.html
63  *
64  * Local variables:
65  * c-basic-offset: 4
66  * tab-width: 8
67  * indent-tabs-mode: nil
68  * End:
69  *
70  * vi: set shiftwidth=4 tabstop=8 expandtab:
71  * :indentSize=4:tabSize=8:noTabs=true:
72  */
Definition: wslua_file_common.h:24
Definition: wslua.h:298
Definition: wslua.h:310
Definition: wslua.h:291
Definition: wslua.h:304
Definition: buffer.h:22
Definition: wtap-int.h:97
Definition: file_wrappers.c:163
Definition: wtap.h:1431
Definition: wtap-int.h:37