| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
exported_pdu.h File Reference
`#include "ws_symbol_export.h"`
`#include "ws_attributes.h"`
`#include <epan/tvbuff.h>`
`#include <epan/packet_info.h>`
`#include <wsutil/exported_pdu_tlvs.h>`

Go to the source code of this file.

## Classes
struct | exp_pdu_data_item
struct | _exp_pdu_data_t

## Macros
#define | EXPORT_PDU_TAP_NAME_LAYER_3 "OSI layer 3"
#define | EXPORT_PDU_TAP_NAME_LAYER_4 "OSI layer 4"
#define | EXPORT_PDU_TAP_NAME_LAYER_7 "OSI layer 7"

## Typedefs
typedef int(* | exp_pdu_get_size) (packet_info *pinfo, void *data)
typedef int(* | exp_pdu_populate_data) (packet_info *pinfo, void *data, uint8_t *tlv_buffer, uint32_t tlv_buffer_size)
typedef struct exp_pdu_data_item | exp_pdu_data_item_t
typedef struct _exp_pdu_data_t | exp_pdu_data_t

## Functions
WS_DLL_PUBLIC int | register_export_pdu_tap (const char *name)
WS_DLL_PUBLIC int | register_export_pdu_tap_with_encap (const char *name, int encap)
WS_DLL_PUBLIC GSList * | get_export_pdu_tap_list (void)
WS_DLL_PUBLIC int | export_pdu_tap_get_encap (const char *name)
WS_DLL_PUBLIC exp_pdu_data_t * | export_pdu_create_tags (packet_info *pinfo, const char *proto_name, uint16_t tag_type, const exp_pdu_data_item_t **items)
WS_DLL_PUBLIC exp_pdu_data_t * | export_pdu_create_common_tags (packet_info *pinfo, const char *proto_name, uint16_t tag_type)
WS_DLL_PUBLIC int | exp_pdu_data_dissector_table_num_value_size (packet_info *pinfo, void *data)
WS_DLL_PUBLIC int | exp_pdu_data_dissector_table_num_value_populate_data (packet_info *pinfo, void *data, uint8_t *tlv_buffer, uint32_t buffer_size)
void | export_pdu_init (void)
void | export_pdu_cleanup (void)

## Variables
WS_DLL_PUBLIC exp_pdu_data_item_t | exp_pdu_data_src_ip
WS_DLL_PUBLIC exp_pdu_data_item_t | exp_pdu_data_dst_ip
WS_DLL_PUBLIC exp_pdu_data_item_t | exp_pdu_data_port_type
WS_DLL_PUBLIC exp_pdu_data_item_t | exp_pdu_data_src_port
WS_DLL_PUBLIC exp_pdu_data_item_t | exp_pdu_data_dst_port
WS_DLL_PUBLIC exp_pdu_data_item_t | exp_pdu_data_orig_frame_num

## Detailed Description

Routines for exported_pdu dissection Copyright 2013, Anders Broman ander.nosp@m.s-br.nosp@m.oman@.nosp@m.eric.nosp@m.sson..nosp@m.com

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

## Typedef Documentation

## ◆ exp_pdu_get_size

typedef int(* exp_pdu_get_size) (packet_info *pinfo, void *data)

Compute the size (in bytes) of a pdu item

Parameters

  pinfo | Packet info that may contain data for the pdu item
  data | optional data of the pdu item

Returns
  the size of the pdu item

## ◆ exp_pdu_populate_data

typedef int(* exp_pdu_populate_data) (packet_info *pinfo, void *data, uint8_t *tlv_buffer, uint32_t tlv_buffer_size)

Populate a buffer with pdu item data

Parameters

  pinfo | Packet info that may contain data for the PDU item
  data | optional data of the PDU item
  tlv_buffer | buffer to be populated with PDU item
  tlv_buffer_size | size of buffer to be populated

Returns
  the number of bytes populated to the buffer (typically PDU item size)

## Function Documentation

## ◆ export_pdu_create_common_tags()

WS_DLL_PUBLIC exp_pdu_data_t * export_pdu_create_common_tags | ( | packet_info * | pinfo,
|  | const char * | proto_name,
|  | uint16_t | tag_type
| ) |  |

Allocates and fills the exp_pdu_data_t struct with a common list of items The items that will be exported as the PDU are:

1. Source IP
2. Destination IP
3. Port type
4. Source Port
5. Destination Port
6. Original frame number

Parameters

  pinfo | Packet info that may contain data for the PDU items
  tag_type | Tag type for protocol's PDU. Must be EXP_PDU_TAG_DISSECTOR_NAME, EXP_PDU_TAG_HEUR_DISSECTOR_NAME or EXP_PDU_TAG_DISSECTOR_TABLE_NAME
  proto_name | Name of protocol that is exporting PDU

Returns
  filled exp_pdu_data_t struct

## ◆ export_pdu_create_tags()

WS_DLL_PUBLIC exp_pdu_data_t * export_pdu_create_tags | ( | packet_info * | pinfo,
|  | const char * | proto_name,
|  | uint16_t | tag_type,
|  | const exp_pdu_data_item_t ** | items_list
| ) |  |

Allocates and fills the exp_pdu_data_t struct according to the list of items

The tags in the tag buffer SHOULD be added in numerical order.

Parameters

  pinfo | Packet info that may contain data for the PDU items
  proto_name | Name of protocol that is exporting PDU
  tag_type | Tag type for protocol's PDU. Must be EXP_PDU_TAG_DISSECTOR_NAME or EXP_PDU_TAG_HEUR_DISSECTOR_NAME.
  items | PDU items to be exported

Returns
  filled exp_pdu_data_t struct

Allocates and fills the exp_pdu_data_t struct according to the list of items

The tags in the tag buffer SHOULD be added in numerical order.