9#ifndef __WTAP_FILE_WRAPPERS_H__
10#define __WTAP_FILE_WRAPPERS_H__
16extern FILE_T file_open(
const char *path);
17extern FILE_T file_fdopen(
int fildes);
18extern void file_set_random_access(
FILE_T stream,
bool random_flag, GPtrArray *seek);
19WS_DLL_PUBLIC int64_t file_seek(
FILE_T stream, int64_t offset,
int whence,
int *err);
22extern int file_fstat(
FILE_T stream, ws_statb64 *statb,
int *err);
24WS_DLL_PUBLIC
int file_read(
void *buf,
unsigned int count,
FILE_T file);
27WS_DLL_PUBLIC
char *file_gets(
char *buf,
int len,
FILE_T stream);
28WS_DLL_PUBLIC
char *file_getsp(
char *buf,
int len,
FILE_T stream);
30WS_DLL_PUBLIC
int file_error(
FILE_T fh,
char **err_info);
32extern void file_fdclose(
FILE_T file);
33extern bool file_fdreopen(
FILE_T file,
const char *path);
34extern void file_close(
FILE_T file);
36#if defined (HAVE_ZLIB) || defined (HAVE_ZLIBNG)
37typedef struct wtap_writer *GZWFILE_T;
39extern GZWFILE_T gzwfile_open(
const char *path);
40extern GZWFILE_T gzwfile_fdopen(
int fd);
41extern unsigned gzwfile_write(GZWFILE_T state,
const void *buf,
unsigned len);
42extern int gzwfile_flush(GZWFILE_T state);
43extern int gzwfile_close(GZWFILE_T state);
44extern int gzwfile_geterr(GZWFILE_T state);
48typedef struct lz4_writer *LZ4WFILE_T;
50extern LZ4WFILE_T lz4wfile_open(
const char *path);
51extern LZ4WFILE_T lz4wfile_fdopen(
int fd);
52extern size_t lz4wfile_write(LZ4WFILE_T state,
const void *buf,
size_t len);
53extern int lz4wfile_flush(LZ4WFILE_T state);
54extern int lz4wfile_close(LZ4WFILE_T state);
55extern int lz4wfile_geterr(LZ4WFILE_T state);
Definition file_wrappers.c:222