#include "tap.h"
#include <epan/wmem_scopes.h>
Go to the source code of this file.
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
◆ EXPORT_OBJECT_MAXFILELEN
| #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.
◆ export_object_gui_reset_cb
| 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
◆ export_object_object_list_add_entry_cb
Callback invoked by a dissector to add a newly extracted object entry into the GUI list.
- Parameters
-
| 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. |
◆ export_object_object_list_get_entry_cb
Callback invoked to retrieve an existing object entry from the GUI list by row index.
- Parameters
-
| gui_data | GUI-specific context data passed through from the export_object_list_t. |
| row | Zero-based row index of the entry to retrieve. |
- Returns
- Pointer to the export_object_entry_t at the specified row, or NULL if not found.
◆ register_eo_t
Structure for information about a registered exported object
◆ eo_ct2ext()
| WS_DLL_PUBLIC const char * eo_ct2ext |
( |
const char * |
content_type | ) |
|
Map the content type string to an extension string
- Parameters
-
| content_type | content type to match with extension string |
- Returns
- extension string for content type
◆ eo_entry_equal()
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.
- Parameters
-
| entry_a | The first export_object_entry_t to compare |
| entry_b | The second export_object_entry_t to compare |
- Returns
- Whether the two entries are equal (ignoring pkt_num).
◆ eo_entry_hash()
Produce a hash for an export_object_entry_t, ignoring the packet number.
- Parameters
-
| entry | The export_object_entry_t to hash |
- Returns
- A hash
◆ eo_free_entry()
Free the contents of export_object_entry_t structure
- Parameters
-
| entry | export_object_entry_t structure to be freed |
◆ eo_iterate_tables()
Iterator to walk Export Object list and execute func
- Parameters
-
| func | action to be performed on all Export Objects |
| user_data | any data needed to help perform function |
◆ eo_massage_str()
| 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
- Parameters
-
| in_str | string to massage |
| maxlen | maximum size a string can be post massage |
| dup | return a copy of the massaged string (?) |
- Returns
- massaged string
◆ export_object_init()
| void export_object_init |
( |
void |
| ) |
|
|
extern |
Initialize the export object system.
◆ get_eo_by_name()
| WS_DLL_PUBLIC register_eo_t * get_eo_by_name |
( |
const char * |
name | ) |
|
Get Export Object by its protocol filter name
- Parameters
-
| name | protocol filter name to fetch. |
- Returns
- Export Object handler pointer or NULL.
◆ get_eo_packet_func()
| WS_DLL_PUBLIC tap_packet_cb get_eo_packet_func |
( |
register_eo_t * |
eo | ) |
|
Get tap function handler from Export Object
- Parameters
-
| eo | Registered Export Object |
- Returns
- tap function handler of Export Object
◆ get_eo_proto_id()
Get protocol ID from Export Object
- Parameters
-
| eo | Registered Export Object |
- Returns
- protocol id of Export Object
◆ get_eo_reset_func()
Get tap reset function handler from Export Object
- Parameters
-
| eo | Registered Export Object |
- Returns
- tap function handler of Export Object
◆ get_eo_tap_listener_name()
| 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
- Parameters
-
| eo | Registered Export Object |
- Returns
- string for register_tap_listener call
◆ 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 |
|
) |
| |
Register the export object handler for the Export Object windows.
- Parameters
-
| 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 |
- Returns
- Tap id registered for the Export Object