![]() |
Wireshark 4.5.0
The Wireshark network protocol analyzer
|
#include "wtap.h"
#include <time.h>
#include <wsutil/array.h>
#include <wsutil/file_util.h>
#include "wtap_opttypes.h"
#include <wsutil/pint.h>
Go to the source code of this file.
Classes | |
struct | wtap |
struct | wtap_dumper |
struct | backwards_compatibiliity_lua_name |
Macros | |
#define | PBSWAP64(p) |
#define | PBSWAP32(p) |
#define | PBSWAP16(p) |
#define | phtons(p, v) |
#define | phton24(p, v) |
#define | phtonl(p, v) |
#define | phtonll(p, v) |
#define | phtole8(p, v) |
#define | phtoles(p, v) |
#define | phtole24(p, v) |
#define | phtolel(p, v) |
#define | phtolell(p, v) |
Typedefs | |
typedef bool(* | subtype_read_func) (struct wtap *, wtap_rec *, int *, char **, int64_t *) |
typedef bool(* | subtype_seek_read_func) (struct wtap *, int64_t, wtap_rec *, int *, char **) |
typedef void * | WFILE_T |
typedef bool(* | subtype_add_idb_func) (struct wtap_dumper *, wtap_block_t, int *, char **) |
typedef bool(* | subtype_write_func) (struct wtap_dumper *, const wtap_rec *, int *, char **) |
typedef bool(* | subtype_finish_func) (struct wtap_dumper *, int *, char **) |
Functions | |
void | wtap_init_file_type_subtypes (void) |
WS_DLL_PUBLIC int | wtap_fstat (wtap *wth, ws_statb64 *statb, int *err) |
WS_DLL_PUBLIC bool | wtap_dump_file_write (wtap_dumper *wdh, const void *buf, size_t bufsize, int *err) |
WS_DLL_PUBLIC int64_t | wtap_dump_file_seek (wtap_dumper *wdh, int64_t offset, int whence, int *err) |
WS_DLL_PUBLIC int64_t | wtap_dump_file_tell (wtap_dumper *wdh, int *err) |
WS_DLL_PUBLIC bool | wtap_read_bytes_or_eof (FILE_T fh, void *buf, unsigned int count, int *err, char **err_info) |
WS_DLL_PUBLIC bool | wtap_read_bytes (FILE_T fh, void *buf, unsigned int count, int *err, char **err_info) |
WS_DLL_PUBLIC bool | wtap_read_bytes_buffer (FILE_T fh, Buffer *buf, unsigned length, int *err, char **err_info) |
bool | wtap_full_file_read (wtap *wth, wtap_rec *rec, int *err, char **err_info, int64_t *data_offset) |
bool | wtap_full_file_seek_read (wtap *wth, int64_t seek_off, wtap_rec *rec, int *err, char **err_info) |
void | wtap_add_idb (wtap *wth, wtap_block_t idb) |
void | wtapng_process_nrb (wtap *wth, wtap_block_t nrb) |
void | wtapng_process_dsb (wtap *wth, wtap_block_t dsb) |
void | wtap_register_compatibility_file_subtype_name (const char *old_name, const char *new_name) |
void | wtap_register_backwards_compatibility_lua_name (const char *name, int ft) |
WS_DLL_PUBLIC const GArray * | get_backwards_compatibility_lua_table (void) |
GArray * | wtap_file_get_shb_for_new_file (wtap *wth) |
Gets new section header block for new file, based on existing info. | |
WS_DLL_PUBLIC void | wtap_add_generated_idb (wtap *wth) |
Generate an IDB, given a wiretap handle for the file, using the file's encapsulation type, snapshot length, and time stamp resolution, and add it to the interface data for a file. | |
wtap_block_t | wtap_dump_params_generate_idb (const wtap_dump_params *params) |
Generate an IDB, given a set of dump parameters, using the parameters' encapsulation type, snapshot length, and time stamp resolution. For use when a dump file has a given encapsulation type, and the source is not passing IDBs. | |
wtap_block_t | wtap_rec_generate_idb (const wtap_rec *rec) |
Generate an IDB, given a packet record, using the records's encapsulation type and time stamp resolution, and the default snap length for the encapsulation type. For use when a file has per-packet encapsulation, and the source is not passing along IDBs. | |
GArray * | wtap_file_get_nrb_for_new_file (wtap *wth) |
Gets new name resolution info for new file, based on existing info. | |
Variables | |
int | wtap_num_file_types |
Wiretap Library Copyright (c) 1998 by Gilbert Ramirez gram@.nosp@m.alum.nosp@m.ni.ri.nosp@m.ce.e.nosp@m.du
SPDX-License-Identifier: GPL-2.0-or-later
#define PBSWAP16 | ( | p | ) |
#define PBSWAP32 | ( | p | ) |
#define PBSWAP64 | ( | p | ) |
#define phtole24 | ( | p, | |
v | |||
) |
#define phtole8 | ( | p, | |
v | |||
) |
#define phtolel | ( | p, | |
v | |||
) |
#define phtolell | ( | p, | |
v | |||
) |
#define phtoles | ( | p, | |
v | |||
) |
#define phton24 | ( | p, | |
v | |||
) |
#define phtonl | ( | p, | |
v | |||
) |
#define phtonll | ( | p, | |
v | |||
) |
#define phtons | ( | p, | |
v | |||
) |
WS_DLL_PUBLIC void wtap_add_generated_idb | ( | wtap * | wth | ) |
Generate an IDB, given a wiretap handle for the file, using the file's encapsulation type, snapshot length, and time stamp resolution, and add it to the interface data for a file.
wth | The wiretap handle for the file. |
void wtap_add_idb | ( | wtap * | wth, |
wtap_block_t | idb | ||
) |
Add an IDB to the interface data for a file.
wtap_block_t wtap_dump_params_generate_idb | ( | const wtap_dump_params * | params | ) |
Generate an IDB, given a set of dump parameters, using the parameters' encapsulation type, snapshot length, and time stamp resolution. For use when a dump file has a given encapsulation type, and the source is not passing IDBs.
params | The wtap dump parameters. |
GArray * wtap_file_get_nrb_for_new_file | ( | wtap * | wth | ) |
Gets new name resolution info for new file, based on existing info.
Creates a new wtap_block_t of name resolution info and only copies appropriate members for a new file.
wth | The wiretap session. |
GArray * wtap_file_get_shb_for_new_file | ( | wtap * | wth | ) |
Gets new section header block for new file, based on existing info.
Creates a new wtap_block_t section header block and only copies appropriate members of the SHB for a new file. In particular, the comment string is copied, and any custom options which should be copied are copied. The os, hardware, and application strings are not copied.
wth | The wiretap session. |
wtap_block_t wtap_rec_generate_idb | ( | const wtap_rec * | rec | ) |
Generate an IDB, given a packet record, using the records's encapsulation type and time stamp resolution, and the default snap length for the encapsulation type. For use when a file has per-packet encapsulation, and the source is not passing along IDBs.
rec | The packet record. |
void wtapng_process_dsb | ( | wtap * | wth, |
wtap_block_t | dsb | ||
) |
Invokes the callback with the given decryption secrets block.
void wtapng_process_nrb | ( | wtap * | wth, |
wtap_block_t | nrb | ||
) |
Invokes the callback with the given name resolution block.