Go to the source code of this file.
|
| 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.
|
| |
| 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.
|
| |
| bool | exp_pdu_close (exp_pdu_t *exp_pdu_tap_data, int *err, char **err_info) |
| | Closes an exported PDU tap.
|
| |
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
◆ exp_pdu_close()
| bool exp_pdu_close |
( |
exp_pdu_t * |
exp_pdu_tap_data, |
|
|
int * |
err, |
|
|
char ** |
err_info |
|
) |
| |
Closes an exported PDU tap.
- Parameters
-
| exp_pdu_tap_data | Pointer to the export PDU tap data structure. |
| err | Pointer to an integer that will receive an error code if an error occurs. |
| err_info | Pointer to a string that will receive an error message if an error occurs. |
- Returns
- True if the tap was successfully closed, false otherwise.
◆ 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
-
| data | The export PDU tap data structure. |
| pathname | The name of the file to write to. This is used for error reporting and may be NULL if the file descriptor is valid. |
| file_type_subtype | The file type and subtype to use for the output file. |
| fd | The file descriptor to use for writing the output file. |
| comment | A comment to add to the output file, or NULL if no comment should be added. |
| [out] | err | Will be set to an error code on failure. |
| [out] | err_info | for 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_name | One of the names registered with register_export_pdu_tap(). |
| filter | An 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.