9#ifndef __WTAP_MODULE_H__
10#define __WTAP_MODULE_H__
40 int* err,
char** err_info, int64_t* offset);
53 int* err,
char** err_info);
134 int* err,
char** err_info);
146 int* err,
char** err_info);
214 size_t bufsize,
int *err);
226 int whence,
int *err);
311 int64_t *data_offset);
327 int *err,
char **err_info);
383 const char *new_name);
A dynamic byte buffer with adjustable start and end positions.
Definition buffer.h:30
Definition wtap_opttypes.h:272
Wiretap dumper handle and associated state.
Definition wtap_module.h:163
void * wslua_data
Definition wtap_module.h:178
unsigned dpibs_growing_written
Definition wtap_module.h:201
unsigned nrbs_growing_written
Definition wtap_module.h:198
GArray * dsbs_initial
Definition wtap_module.h:188
bool needs_reload
Definition wtap_module.h:174
GArray * interface_data
Definition wtap_module.h:187
const GArray * dsbs_growing
Definition wtap_module.h:195
int64_t bytes_dumped
Definition wtap_module.h:175
subtype_write_func subtype_write
Definition wtap_module.h:181
WFILE_T fh
Definition wtap_module.h:164
const GArray * mevs_growing
Definition wtap_module.h:196
unsigned mevs_growing_written
Definition wtap_module.h:200
int snaplen
Definition wtap_module.h:166
const GArray * shb_iface_to_global
Definition wtap_module.h:186
ws_compression_type compression_type
Definition wtap_module.h:173
const GArray * dpibs_growing
Definition wtap_module.h:197
unsigned dsbs_growing_written
Definition wtap_module.h:199
addrinfo_lists_t * addrinfo_lists
Definition wtap_module.h:184
int file_type_subtype
Definition wtap_module.h:165
const GArray * nrbs_growing
Definition wtap_module.h:194
void * priv
Definition wtap_module.h:177
subtype_finish_func subtype_finish
Definition wtap_module.h:182
subtype_add_idb_func subtype_add_idb
Definition wtap_module.h:180
GArray * shb_hdrs
Definition wtap_module.h:185
Definition file_wrappers.c:97
Definition wtap_module.h:58
GArray * interface_data
Definition wtap_module.h:66
bool ispipe
Definition wtap_module.h:61
nstime_t file_start_ts
Definition wtap_module.h:99
unsigned next_dpib_id
Definition wtap_module.h:72
wtap_new_secrets_callback_t add_new_secrets
Definition wtap_module.h:113
int file_tsprec
Definition wtap_module.h:89
const char * app_env_var_prefix
Definition wtap_module.h:74
subtype_read_func subtype_read
Definition wtap_module.h:79
nstime_t file_end_ts
Definition wtap_module.h:105
GArray * shb_iface_to_global
Definition wtap_module.h:65
unsigned snapshot_length
Definition wtap_module.h:63
GPtrArray * fast_seek
Definition wtap_module.h:114
subtype_seek_read_func subtype_seek_read
Definition wtap_module.h:80
int file_encap
Definition wtap_module.h:83
void(* subtype_sequential_close)(struct wtap *)
Definition wtap_module.h:81
FILE_T random_fh
Definition wtap_module.h:60
FILE_T fh
Definition wtap_module.h:59
unsigned next_interface_data
Definition wtap_module.h:67
GArray * nrbs
Definition wtap_module.h:68
GArray * shb_hdrs
Definition wtap_module.h:64
GArray * dpibs
Definition wtap_module.h:71
char * pathname
Definition wtap_module.h:73
int file_type_subtype
Definition wtap_module.h:62
wtap_new_ipv4_callback_t add_new_ipv4
Definition wtap_module.h:111
GArray * meta_events
Definition wtap_module.h:70
wtap_new_ipv6_callback_t add_new_ipv6
Definition wtap_module.h:112
void * priv
Definition wtap_module.h:76
void * wslua_data
Definition wtap_module.h:77
void(* subtype_close)(struct wtap *)
Definition wtap_module.h:82
GArray * dsbs
Definition wtap_module.h:69
void(* wtap_new_secrets_callback_t)(uint32_t secrets_type, const void *secrets, unsigned size)
Callback type for receiving new decryption secrets.
Definition wtap.h:2089
void(* wtap_new_ipv6_callback_t)(const ws_in6_addr *addrp, const char *name, const bool static_entry)
Callback type for registering new IPv6 hostnames.
Definition wtap.h:2065
void(* wtap_new_ipv4_callback_t)(const unsigned addr, const char *name, const bool static_entry)
Callback type for registering new IPv4 hostnames.
Definition wtap.h:2041
void wtap_register_backwards_compatibility_lua_name(const char *name, int ft)
Register a backwards compatibility Lua name for a file type.
Definition file_access.c:2871
WS_DLL_PUBLIC bool wtap_dump_file_write(wtap_dumper *wdh, const void *buf, size_t bufsize, int *err)
Write raw data to the dump file.
Definition file_access.c:2730
void wtapng_process_nrb(wtap *wth, wtap_block_t nrb)
Invoke the registered callback with a Name Resolution Block (NRB).
Definition wtap.c:1712
bool wtap_full_file_read(wtap *wth, wtap_rec *rec, int *err, char **err_info, int64_t *data_offset)
Read entire file contents as a single packet (sequential mode).
Definition wtap.c:2164
bool(* subtype_seek_read_func)(struct wtap *wtap, int64_t seek_off, wtap_rec *rec, int *err, char **err_info)
Function pointer type for seeking and reading a record.
Definition wtap_module.h:52
bool(* subtype_read_func)(struct wtap *wtap, wtap_rec *rec, int *err, char **err_info, int64_t *offset)
Function pointer type for reading a record.
Definition wtap_module.h:39
void wtapng_process_dsb(wtap *wth, wtap_block_t dsb)
Invoke the registered callback with a Decryption Secrets Block (DSB).
Definition wtap.c:1736
WS_DLL_PUBLIC int wtap_fstat(wtap *wth, ws_statb64 *statb, int *err)
Retrieve file statistics for a wiretap handle.
Definition wtap.c:95
void * WFILE_T
Abstract file handle for writing.
Definition wtap_module.h:122
WS_DLL_PUBLIC bool wtap_read_bytes_or_eof(FILE_T fh, void *buf, unsigned int count, int *err, char **err_info)
Read a specified number of bytes from a file or discard them.
Definition wtap.c:1915
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 resolut...
Definition wtap.c:2051
WS_DLL_PUBLIC bool wtap_read_bytes_buffer(FILE_T fh, Buffer *buf, unsigned length, int *err, char **err_info)
Read a specified number of bytes into a Buffer, growing it as needed.
Definition wtap.c:1970
bool wtap_full_file_seek_read(wtap *wth, int64_t seek_off, wtap_rec *rec, int *err, char **err_info)
Read entire file contents as a single packet (seek mode).
Definition wtap.c:2180
WS_DLL_PUBLIC int64_t wtap_dump_file_seek(wtap_dumper *wdh, int64_t offset, int whence, int *err)
Seek to a position in the dump file.
Definition file_access.c:2797
bool(* subtype_write_func)(struct wtap_dumper *dumper, const wtap_rec *rec, int *err, char **err_info)
Function pointer type for writing a record.
Definition wtap_module.h:145
WS_DLL_PUBLIC int64_t wtap_dump_file_tell(wtap_dumper *wdh, int *err)
Get current position in the dump file.
Definition file_access.c:2817
WS_DLL_PUBLIC bool wtap_read_bytes(FILE_T fh, void *buf, unsigned int count, int *err, char **err_info)
Read a specified number of bytes from a file or discard them.
Definition wtap.c:1944
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,...
Definition wtap.c:384
bool(* subtype_add_idb_func)(struct wtap_dumper *dumper, wtap_block_t idb, int *err, char **err_info)
Function pointer type for adding an Interface Description Block (IDB).
Definition wtap_module.h:133
bool(* subtype_finish_func)(struct wtap_dumper *dumper, int *err, char **err_info)
Function pointer type for finalizing a dump file.
Definition wtap_module.h:156
void wtap_add_dpib(wtap *wth, wtap_block_t dpib)
Add a DPIB to the dpibs list for a file.
Definition wtap.c:308
void wtap_add_idb(wtap *wth, wtap_block_t idb)
Add an Interface Description Block (IDB) to a wiretap handle.
Definition wtap.c:302
void wtap_register_compatibility_file_subtype_name(const char *old_name, const char *new_name)
Register a compatibility alias for a file subtype name.
Definition file_access.c:1657