9 #ifndef __WTAP_FILE_WRAPPERS_H__
10 #define __WTAP_FILE_WRAPPERS_H__
12 #include <wireshark.h>
16 extern FILE_T file_open(
const char *path);
17 extern FILE_T file_fdopen(
int fildes);
18 extern void file_set_random_access(
FILE_T stream, gboolean random_flag, GPtrArray *seek);
19 WS_DLL_PUBLIC gint64 file_seek(
FILE_T stream, gint64 offset,
int whence,
int *err);
22 extern int file_fstat(
FILE_T stream, ws_statb64 *statb,
int *err);
24 WS_DLL_PUBLIC
int file_read(
void *buf,
unsigned int count,
FILE_T file);
27 WS_DLL_PUBLIC
char *file_gets(
char *buf,
int len,
FILE_T stream);
28 WS_DLL_PUBLIC
char *file_getsp(
char *buf,
int len,
FILE_T stream);
30 WS_DLL_PUBLIC
int file_error(
FILE_T fh, gchar **err_info);
32 extern void file_fdclose(
FILE_T file);
33 extern int file_fdreopen(
FILE_T file,
const char *path);
34 extern void file_close(
FILE_T file);
37 typedef struct wtap_writer *GZWFILE_T;
39 extern GZWFILE_T gzwfile_open(
const char *path);
40 extern GZWFILE_T gzwfile_fdopen(
int fd);
41 extern guint gzwfile_write(GZWFILE_T state,
const void *buf, guint len);
42 extern int gzwfile_flush(GZWFILE_T state);
43 extern int gzwfile_close(GZWFILE_T state);
44 extern int gzwfile_geterr(GZWFILE_T state);
Definition: file_wrappers.c:168