| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
export_object.h File Reference
`#include "tap.h"`
`#include <epan/wmem_scopes.h>`

Go to the source code of this file.

## Classes
struct | _export_object_entry_t
struct | _export_object_list_t

## Macros
#define | EXPORT_OBJECT_MAXFILELEN 255

## Typedefs
typedef struct _export_object_entry_t | export_object_entry_t
typedef void(* | export_object_object_list_add_entry_cb) (void *gui_data, struct _export_object_entry_t *entry)
typedef export_object_entry_t *(* | export_object_object_list_get_entry_cb) (void *gui_data, int row)
typedef struct _export_object_list_t | export_object_list_t
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)

## Detailed Description

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

## Macro Definition Documentation

## ◆ 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.

## Typedef Documentation

## ◆ register_eo_t

typedef struct register_eo register_eo_t

Structure for information about a registered exported object

## Function Documentation

## ◆ 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_free_entry()

WS_DLL_PUBLIC void eo_free_entry | ( | export_object_entry_t * | entry | ) |

Free the contents of export_object_entry_t structure

Parameters

  entry | export_object_entry_t structure to be freed

## ◆ eo_iterate_tables()

WS_DLL_PUBLIC void eo_iterate_tables | ( | wmem_foreach_func | func,
|  | void * | user_data
| ) |  |

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()

WS_DLL_PUBLIC int get_eo_proto_id | ( | register_eo_t * | eo | ) |

Get protocol ID from Export Object

Parameters

  eo | Registered Export Object

Returns
  protocol id of Export Object

## ◆ get_eo_reset_func()

WS_DLL_PUBLIC export_object_gui_reset_cb get_eo_reset_func | ( | register_eo_t * | eo | ) |

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