|
Wireshark 4.7.3
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Classes | |
| struct | _export_object_entry_t |
| Represents a single object extracted from a packet capture for export. More... | |
| struct | _export_object_list_t |
| Abstracts the GUI-specific operations needed to manage a list of exported objects during dissection. More... | |
Macros | |
| #define | EXPORT_OBJECT_MAXFILELEN 255 |
Typedefs | |
| typedef struct _export_object_entry_t | export_object_entry_t |
| Represents a single object extracted from a packet capture for export. | |
| typedef 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. | |
| typedef 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. | |
| typedef struct _export_object_list_t | export_object_list_t |
| Abstracts the GUI-specific operations needed to manage a list of exported objects during dissection. | |
| typedef struct register_eo | register_eo_t |
| typedef void(* | export_object_gui_reset_cb) (void) |
Functions | |
| void | export_object_init (void) |
| WS_DLL_PUBLIC int | register_export_object (const int proto_id, tap_packet_cb export_packet_func, export_object_gui_reset_cb reset_cb) |
| WS_DLL_PUBLIC int | get_eo_proto_id (register_eo_t *eo) |
| WS_DLL_PUBLIC const char * | get_eo_tap_listener_name (register_eo_t *eo) |
| WS_DLL_PUBLIC tap_packet_cb | get_eo_packet_func (register_eo_t *eo) |
| WS_DLL_PUBLIC export_object_gui_reset_cb | get_eo_reset_func (register_eo_t *eo) |
| WS_DLL_PUBLIC register_eo_t * | get_eo_by_name (const char *name) |
| WS_DLL_PUBLIC void | eo_iterate_tables (wmem_foreach_func func, void *user_data) |
| WS_DLL_PUBLIC GString * | eo_massage_str (const char *in_str, size_t maxlen, int dup) |
| WS_DLL_PUBLIC const char * | eo_ct2ext (const char *content_type) |
| WS_DLL_PUBLIC void | eo_free_entry (export_object_entry_t *entry) |
| WS_DLL_PUBLIC unsigned | eo_entry_hash (export_object_entry_t *entry) |
| WS_DLL_PUBLIC bool | eo_entry_equal (export_object_entry_t *entry_a, export_object_entry_t *entry_b) |
GUI independent helper routines common to all export object taps.
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| #define EXPORT_OBJECT_MAXFILELEN 255 |
Maximum file name size for the file to which we save an object. This is the file name size, not the path name size; we impose the limit so that the file doesn't have a ridiculously long name, e.g. an HTTP object where the URL has a long query part.
| typedef void(* export_object_gui_reset_cb) (void) |
When a protocol needs intermediate data structures to construct the export objects, then it must specify a function that cleans up all those data structures. This function is passed to export_object_window and called when tap reset or windows closes occurs. If no function is needed a NULL value should be passed instead
| typedef 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.
| gui_data | GUI-specific context data passed through from the export_object_list_t. |
| entry | The export object entry to be added to the list. |
| typedef 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.
| gui_data | GUI-specific context data passed through from the export_object_list_t. |
| row | Zero-based row index of the entry to retrieve. |
| typedef struct register_eo register_eo_t |
Structure for information about a registered exported object
| WS_DLL_PUBLIC const char * eo_ct2ext | ( | const char * | content_type | ) |
Map the content type string to an extension string
| content_type | content type to match with extension string |
| WS_DLL_PUBLIC bool eo_entry_equal | ( | export_object_entry_t * | entry_a, |
| export_object_entry_t * | entry_b ) |
Compare two export_object_entry_t for equality. This ignores the packet number, as a primary use case is ignoring objects which are sent more than once in the same capture.
| entry_a | The first export_object_entry_t to compare |
| entry_b | The second export_object_entry_t to compare |
| WS_DLL_PUBLIC unsigned eo_entry_hash | ( | export_object_entry_t * | entry | ) |
Produce a hash for an export_object_entry_t, ignoring the packet number.
| entry | The export_object_entry_t to hash |
| WS_DLL_PUBLIC void eo_free_entry | ( | export_object_entry_t * | entry | ) |
Free the contents of export_object_entry_t structure
| entry | export_object_entry_t structure to be freed |
| WS_DLL_PUBLIC void eo_iterate_tables | ( | wmem_foreach_func | func, |
| void * | user_data ) |
Iterator to walk Export Object list and execute func
| func | action to be performed on all Export Objects |
| user_data | any data needed to help perform function |
| WS_DLL_PUBLIC GString * eo_massage_str | ( | const char * | in_str, |
| size_t | maxlen, | ||
| int | dup ) |
Find all disallowed characters/bytes and replace them with xx
| in_str | string to massage |
| maxlen | maximum size a string can be post massage |
| dup | return a copy of the massaged string (?) |
|
extern |
Initialize the export object system.
| WS_DLL_PUBLIC register_eo_t * get_eo_by_name | ( | const char * | name | ) |
Get Export Object by its protocol filter name
| name | protocol filter name to fetch. |
| WS_DLL_PUBLIC tap_packet_cb get_eo_packet_func | ( | register_eo_t * | eo | ) |
Get tap function handler from Export Object
| eo | Registered Export Object |
| WS_DLL_PUBLIC int get_eo_proto_id | ( | register_eo_t * | eo | ) |
Get protocol ID from Export Object
| eo | Registered Export Object |
| WS_DLL_PUBLIC export_object_gui_reset_cb get_eo_reset_func | ( | register_eo_t * | eo | ) |
Get tap reset function handler from Export Object
| eo | Registered Export Object |
| WS_DLL_PUBLIC const char * get_eo_tap_listener_name | ( | register_eo_t * | eo | ) |
Get string for register_tap_listener call. Typically of the form <dissector_name>_eo
| eo | Registered 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 ) |
Register the export object handler for the Export Object windows.
| proto_id | is the protocol with objects to export |
| export_packet_func | the tap processing function |
| reset_cb | handles clearing intermediate data structures constructed for exporting objects. If no function is needed a NULL value should be passed instead |