Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
tap_export_pdu.h File Reference

Go to the source code of this file.

Classes

struct  _exp_pdu_t
 

Typedefs

typedef struct _exp_pdu_t exp_pdu_t
 

Functions

char * exp_pdu_pre_open (const char *tap_name, const char *filter, exp_pdu_t *exp_pdu_tap_data)
 
bool exp_pdu_open (exp_pdu_t *data, char *pathname, int file_type_subtype, int fd, const char *comment, int *err, char **err_info)
 
bool exp_pdu_close (exp_pdu_t *exp_pdu_tap_data, int *err, char **err_info)
 

Detailed Description

Routines for exporting PDUs to file

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

Function Documentation

◆ exp_pdu_open()

bool exp_pdu_open ( exp_pdu_t data,
char *  pathname,
int  file_type_subtype,
int  fd,
const char *  comment,
int *  err,
char **  err_info 
)

Use the given file descriptor for writing an output file. Can only be called once and exp_pdu_pre_open() must be called before.

Parameters
[out]errWill be set to an error code on failure.
[out]err_infofor some errors, a string giving more details of the error
Returns
true on success or false on failure.

◆ exp_pdu_pre_open()

char * exp_pdu_pre_open ( const char *  tap_name,
const char *  filter,
exp_pdu_t exp_pdu_tap_data 
)

Registers the tap listener which will add matching packets to the exported file. Must be called before exp_pdu_open.

Parameters
tap_nameOne of the names registered with register_export_pdu_tap().
filterAn tap filter, may be NULL to disable filtering which improves performance if you do not need a filter.
Returns
NULL on success or an error string on failure which must be freed with g_free(). Failure could occur when the filter or tap_name are invalid.