| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
export_object.h
Go to the documentation of this file.
1
10#pragma once
11#include "tap.h"
12#include <epan/wmem_scopes.h>
13
14#ifdef __cplusplus
15 extern "C" {
16#endif /* __cplusplus */
17
21 typedef struct _export_object_entry_t {
22 uint32_t pkt_num;
23 char* hostname;
24 char* content_type;
25 char* filename;
26 size_t payload_len;
27 uint8_t* payload_data;
28} export_object_entry_t;
29
34#define EXPORT_OBJECT_MAXFILELEN 255
35
41 typedef void (*export_object_object_list_add_entry_cb)(void* gui_data, struct _export_object_entry_t* entry);
42
49 typedef export_object_entry_t* (*export_object_object_list_get_entry_cb)(void* gui_data, int row);
50
54 typedef struct _export_object_list_t {
55 export_object_object_list_add_entry_cb add_entry;
56 export_object_object_list_get_entry_cb get_entry;
57 void* gui_data;
58} export_object_list_t;
59
61 typedef struct register_eo register_eo_t;
62
68 typedef void (*export_object_gui_reset_cb)(void);
69
72 extern void export_object_init(void);
73
82WS_DLL_PUBLIC int register_export_object(const int proto_id, tap_packet_cb export_packet_func, export_object_gui_reset_cb reset_cb);
83
89WS_DLL_PUBLIC int get_eo_proto_id(register_eo_t* eo);
90
96WS_DLL_PUBLIC const char* get_eo_tap_listener_name(register_eo_t* eo);
97
103WS_DLL_PUBLIC tap_packet_cb get_eo_packet_func(register_eo_t* eo);
104
110WS_DLL_PUBLIC export_object_gui_reset_cb get_eo_reset_func(register_eo_t* eo);
111
117WS_DLL_PUBLIC register_eo_t* get_eo_by_name(const char* name);
118
124WS_DLL_PUBLIC void eo_iterate_tables(wmem_foreach_func func, void *user_data);
125
133WS_DLL_PUBLIC GString *eo_massage_str(const char *in_str, size_t maxlen, int dup);
134
140WS_DLL_PUBLIC const char *eo_ct2ext(const char *content_type);
141
146WS_DLL_PUBLIC void eo_free_entry(export_object_entry_t *entry);
147
154WS_DLL_PUBLIC unsigned eo_entry_hash(export_object_entry_t *entry);
155
164WS_DLL_PUBLIC bool eo_entry_equal(export_object_entry_t *entry_a, export_object_entry_t *entry_b);
165
166#ifdef __cplusplus
167}
168#endif /* __cplusplus */
169
170/*
171 * Editor modelines
172 *
173 * Local Variables:
174 * c-basic-offset: 4
175 * tab-width: 8
176 * indent-tabs-mode: nil
177 * End:
178 *
179 * ex: set shiftwidth=4 tabstop=8 expandtab:
180 * :indentSize=4:tabSize=8:noTabs=true:
181 */
eo_entry_equal
WS_DLL_PUBLIC bool eo_entry_equal(export_object_entry_t *entry_a, export_object_entry_t *entry_b)
Definition export_object.c:167
eo_ct2ext
WS_DLL_PUBLIC const char * eo_ct2ext(const char *content_type)
Definition export_object.c:144
export_object_object_list_add_entry_cb
void(* export_object_object_list_add_entry_cb)(void *gui_data, struct _export_object_entry_t *entry)
Callback invoked by a dissector to add a newly extracted object entry into the GUI list.
Definition export_object.h:41
get_eo_by_name
WS_DLL_PUBLIC register_eo_t * get_eo_by_name(const char *name)
Definition export_object.c:73
export_object_object_list_get_entry_cb
export_object_entry_t *(* export_object_object_list_get_entry_cb)(void *gui_data, int row)
Callback invoked to retrieve an existing object entry from the GUI list by row index.
Definition export_object.h:49
eo_entry_hash
WS_DLL_PUBLIC unsigned eo_entry_hash(export_object_entry_t *entry)
Definition export_object.c:161
register_eo_t
struct register_eo register_eo_t
Definition export_object.h:61
get_eo_tap_listener_name
WS_DLL_PUBLIC const char * get_eo_tap_listener_name(register_eo_t *eo)
Definition export_object.c:58
eo_iterate_tables
WS_DLL_PUBLIC void eo_iterate_tables(wmem_foreach_func func, void *user_data)
Definition export_object.c:78
get_eo_reset_func
WS_DLL_PUBLIC export_object_gui_reset_cb get_eo_reset_func(register_eo_t *eo)
Definition export_object.c:68
export_object_gui_reset_cb
void(* export_object_gui_reset_cb)(void)
Definition export_object.h:68
export_object_list_t
struct _export_object_list_t export_object_list_t
Abstracts the GUI-specific operations needed to manage a list of exported objects during dissection.
export_object_entry_t
struct _export_object_entry_t export_object_entry_t
Represents a single object extracted from a packet capture for export.
eo_massage_str
WS_DLL_PUBLIC GString * eo_massage_str(const char *in_str, size_t maxlen, int dup)
Definition export_object.c:116
export_object_init
void export_object_init(void)
Definition export_object.c:28
get_eo_proto_id
WS_DLL_PUBLIC int get_eo_proto_id(register_eo_t *eo)
Definition export_object.c:50
get_eo_packet_func
WS_DLL_PUBLIC tap_packet_cb get_eo_packet_func(register_eo_t *eo)
Definition export_object.c:63
eo_free_entry
WS_DLL_PUBLIC void eo_free_entry(export_object_entry_t *entry)
Definition export_object.c:151
register_export_object
WS_DLL_PUBLIC int register_export_object(const int proto_id, tap_packet_cb export_packet_func, export_object_gui_reset_cb reset_cb)
Definition export_object.c:34
wmem_foreach_func
bool(* wmem_foreach_func)(const void *key, void *value, void *userdata)
Function type for processing one node of a tree during a traversal.
Definition wmem_tree.h:389
_export_object_entry_t
Represents a single object extracted from a packet capture for export.
Definition export_object.h:21
_export_object_entry_t::filename
char * filename
Definition export_object.h:25
_export_object_entry_t::payload_data
uint8_t * payload_data
Definition export_object.h:27
_export_object_entry_t::hostname
char * hostname
Definition export_object.h:23
_export_object_entry_t::pkt_num
uint32_t pkt_num
Definition export_object.h:22
_export_object_entry_t::content_type
char * content_type
Definition export_object.h:24
_export_object_entry_t::payload_len
size_t payload_len
Definition export_object.h:26
_export_object_list_t
Abstracts the GUI-specific operations needed to manage a list of exported objects during dissection.
Definition export_object.h:54
_export_object_list_t::add_entry
export_object_object_list_add_entry_cb add_entry
Definition export_object.h:55
_export_object_list_t::gui_data
void * gui_data
Definition export_object.h:57
_export_object_list_t::get_entry
export_object_object_list_get_entry_cb get_entry
Definition export_object.h:56
register_eo
Definition export_object.c:19
tap.h
wmem_scopes.h