24void wtap_init_file_type_subtypes(
void);
27int wtap_fstat(
wtap *wth, ws_statb64 *statb,
int *err);
29typedef bool (*subtype_read_func)(
struct wtap*,
wtap_rec *,
30 int *,
char **, int64_t *);
31typedef bool (*subtype_seek_read_func)(
struct wtap*, int64_t,
wtap_rec *,
41 int file_type_subtype;
42 unsigned snapshot_length;
56 subtype_read_func subtype_read;
57 subtype_seek_read_func subtype_seek_read;
58 void (*subtype_sequential_close)(
struct wtap*);
59 void (*subtype_close)(
struct wtap*);
77 wtap_new_ipv6_callback_t add_new_ipv6;
95typedef bool (*subtype_finish_func)(
struct wtap_dumper*,
int*,
char**);
99 int file_type_subtype;
107 wtap_compression_type compression_type;
109 int64_t bytes_dumped;
114 subtype_add_idb_func subtype_add_idb;
115 subtype_write_func subtype_write;
116 subtype_finish_func subtype_finish;
136WS_DLL_PUBLIC
bool wtap_dump_file_write(
wtap_dumper *wdh,
const void *buf,
137 size_t bufsize,
int *err);
138WS_DLL_PUBLIC int64_t wtap_dump_file_seek(
wtap_dumper *wdh, int64_t offset,
int whence,
int *err);
139WS_DLL_PUBLIC int64_t wtap_dump_file_tell(
wtap_dumper *wdh,
int *err);
141extern int wtap_num_file_types;
188#define phtons(p, v) \
190 (p)[0] = (uint8_t)((v) >> 8); \
191 (p)[1] = (uint8_t)((v) >> 0); \
196#define phton24(p, v) \
198 (p)[0] = (uint8_t)((v) >> 16); \
199 (p)[1] = (uint8_t)((v) >> 8); \
200 (p)[2] = (uint8_t)((v) >> 0); \
205#define phtonl(p, v) \
207 (p)[0] = (uint8_t)((v) >> 24); \
208 (p)[1] = (uint8_t)((v) >> 16); \
209 (p)[2] = (uint8_t)((v) >> 8); \
210 (p)[3] = (uint8_t)((v) >> 0); \
215#define phtonll(p, v) \
217 (p)[0] = (uint8_t)((v) >> 56); \
218 (p)[1] = (uint8_t)((v) >> 48); \
219 (p)[2] = (uint8_t)((v) >> 40); \
220 (p)[3] = (uint8_t)((v) >> 32); \
221 (p)[4] = (uint8_t)((v) >> 24); \
222 (p)[5] = (uint8_t)((v) >> 16); \
223 (p)[6] = (uint8_t)((v) >> 8); \
224 (p)[7] = (uint8_t)((v) >> 0); \
229#define phtole8(p, v) \
231 (p)[0] = (uint8_t)((v) >> 0); \
236#define phtoles(p, v) \
238 (p)[0] = (uint8_t)((v) >> 0); \
239 (p)[1] = (uint8_t)((v) >> 8); \
244#define phtole24(p, v) \
246 (p)[0] = (uint8_t)((v) >> 0); \
247 (p)[1] = (uint8_t)((v) >> 8); \
248 (p)[2] = (uint8_t)((v) >> 16); \
253#define phtolel(p, v) \
255 (p)[0] = (uint8_t)((v) >> 0); \
256 (p)[1] = (uint8_t)((v) >> 8); \
257 (p)[2] = (uint8_t)((v) >> 16); \
258 (p)[3] = (uint8_t)((v) >> 24); \
263#define phtolell(p, v) \
265 (p)[0] = (uint8_t)((v) >> 0); \
266 (p)[1] = (uint8_t)((v) >> 8); \
267 (p)[2] = (uint8_t)((v) >> 16); \
268 (p)[3] = (uint8_t)((v) >> 24); \
269 (p)[4] = (uint8_t)((v) >> 32); \
270 (p)[5] = (uint8_t)((v) >> 40); \
271 (p)[6] = (uint8_t)((v) >> 48); \
272 (p)[7] = (uint8_t)((v) >> 56); \
294wtap_read_bytes_or_eof(
FILE_T fh,
void *buf,
unsigned int count,
int *err,
312wtap_read_bytes(
FILE_T fh,
void *buf,
unsigned int count,
int *err,
327wtap_read_bytes_buffer(
FILE_T fh,
Buffer *buf,
unsigned length,
int *err,
335wtap_full_file_read(
wtap *wth,
wtap_rec *rec,
int *err,
char **err_info,
336 int64_t *data_offset);
343wtap_full_file_seek_read(
wtap *wth, int64_t seek_off,
wtap_rec *rec,
344 int *err,
char **err_info);
365wtap_register_compatibility_file_subtype_name(
const char *old_name,
366 const char *new_name);
369wtap_register_backwards_compatibility_lua_name(
const char *name,
int ft);
377const GArray *get_backwards_compatibility_lua_table(
void);
Definition wtap-int.h:371
Definition wtap_opttypes.c:85
unsigned nrbs_growing_written
Definition wtap-int.h:131
GArray * dsbs_initial
Definition wtap-int.h:122
GArray * interface_data
Definition wtap-int.h:121
const GArray * dsbs_growing
Definition wtap-int.h:129
const GArray * mevs_growing
Definition wtap-int.h:130
unsigned mevs_growing_written
Definition wtap-int.h:133
const GArray * shb_iface_to_global
Definition wtap-int.h:120
unsigned dsbs_growing_written
Definition wtap-int.h:132
addrinfo_lists_t * addrinfo_lists
Definition wtap-int.h:118
const GArray * nrbs_growing
Definition wtap-int.h:128
Definition file_wrappers.c:215
GArray * interface_data
Definition wtap-int.h:45
bool ispipe
Definition wtap-int.h:40
GArray * shb_iface_to_global
Definition wtap-int.h:44
FILE_T random_fh
Definition wtap-int.h:39
unsigned next_interface_data
Definition wtap-int.h:46
GArray * nrbs
Definition wtap-int.h:47
char * pathname
Definition wtap-int.h:51
GArray * meta_events
Definition wtap-int.h:49
GArray * dsbs
Definition wtap-int.h:48
void wtapng_process_nrb(wtap *wth, wtap_block_t nrb)
Definition wtap.c:1673
void wtapng_process_dsb(wtap *wth, wtap_block_t dsb)
Definition wtap.c:1697
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:1943
GArray * wtap_file_get_shb_for_new_file(wtap *wth)
Gets new section header block for new file, based on existing info.
Definition wtap.c:151
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,...
Definition wtap.c:618
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:352
void wtap_add_idb(wtap *wth, wtap_block_t idb)
Definition wtap.c:276
GArray * wtap_file_get_nrb_for_new_file(wtap *wth)
Gets new name resolution info for new file, based on existing info.
Definition wtap.c:522
void(* wtap_new_secrets_callback_t)(uint32_t secrets_type, const void *secrets, unsigned size)
Definition wtap.h:1914
void(* wtap_new_ipv4_callback_t)(const unsigned addr, const char *name, const bool static_entry)
Definition wtap.h:1902