| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
file_wrappers.h
Go to the documentation of this file.
1
9#ifndef __WTAP_FILE_WRAPPERS_H__
10#define __WTAP_FILE_WRAPPERS_H__
11
12#include <wireshark.h>
13#include "wtap.h"
14#include <wsutil/file_util.h>
15
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);
19
31WS_DLL_PUBLIC int64_t file_seek(FILE_T stream, int64_t offset, int whence, int *err);
32
41WS_DLL_PUBLIC int64_t file_tell(FILE_T stream);
42
43extern int64_t file_tell_raw(FILE_T stream);
44extern int file_fstat(FILE_T stream, ws_statb64 *statb, int *err);
45
54WS_DLL_PUBLIC bool file_iscompressed(FILE_T stream);
55
66WS_DLL_PUBLIC int file_read(void *buf, unsigned int count, FILE_T file);
67
76WS_DLL_PUBLIC int file_peekc(FILE_T stream);
77
86WS_DLL_PUBLIC int file_getc(FILE_T stream);
87
98WS_DLL_PUBLIC char *file_gets(char *buf, int len, FILE_T stream);
99
110WS_DLL_PUBLIC char *file_getsp(char *buf, int len, FILE_T stream);
111
120WS_DLL_PUBLIC bool file_eof(FILE_T stream);
121
131WS_DLL_PUBLIC int file_error(FILE_T fh, char **err_info);
132
133extern void file_clearerr(FILE_T stream);
134extern void file_fdclose(FILE_T file);
135extern bool file_fdreopen(FILE_T file, const char *path);
136extern void file_close(FILE_T file);
137
138#endif /* __FILE_H__ */
file_util.h
file_iscompressed
WS_DLL_PUBLIC bool file_iscompressed(FILE_T stream)
Check if file is compressed.
Definition file_wrappers.c:2112
file_error
WS_DLL_PUBLIC int file_error(FILE_T fh, char **err_info)
Check for file error.
Definition file_wrappers.c:2379
file_getsp
WS_DLL_PUBLIC char * file_getsp(char *buf, int len, FILE_T stream)
Read a line from the file, skipping leading whitespace.
Definition file_wrappers.c:2287
file_eof
WS_DLL_PUBLIC bool file_eof(FILE_T stream)
Check for end-of-file.
Definition file_wrappers.c:2367
file_gets
WS_DLL_PUBLIC char * file_gets(char *buf, int len, FILE_T stream)
Read a line from the file.
Definition file_wrappers.c:2360
file_getc
WS_DLL_PUBLIC int file_getc(FILE_T stream)
Read the next byte from the file.
Definition file_wrappers.c:2262
file_tell
WS_DLL_PUBLIC int64_t file_tell(FILE_T stream)
Get current position in the file.
Definition file_wrappers.c:2088
file_read
WS_DLL_PUBLIC int file_read(void *buf, unsigned int count, FILE_T file)
Read bytes from a file.
Definition file_wrappers.c:2151
file_seek
WS_DLL_PUBLIC int64_t file_seek(FILE_T stream, int64_t offset, int whence, int *err)
Seek to a position in the file.
Definition file_wrappers.c:1725
file_peekc
WS_DLL_PUBLIC int file_peekc(FILE_T stream)
Peek the next byte from the file without advancing the position.
Definition file_wrappers.c:2215
stream
Definition stream.c:41
wtap_reader
Definition file_wrappers.c:97
wtap.h