| 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
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, bool random_flag, GPtrArray *seek);
19
31WS_WARN_UNUSED WS_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
43 extern int64_t file_tell_raw(FILE_T stream);
44 extern 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
111WS_DLL_PUBLIC char *file_getsp(char *buf, int len, FILE_T stream);
112
121WS_DLL_PUBLIC bool file_eof(FILE_T stream);
122
132WS_DLL_PUBLIC int file_error(FILE_T fh, char **err_info);
133
134 extern void file_clearerr(FILE_T stream);
135 extern void file_fdclose(FILE_T file);
136 extern bool file_fdreopen(FILE_T file, const char *path);
137 extern void file_close(FILE_T file);
138
139#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:2111
file_error
WS_DLL_PUBLIC int file_error(FILE_T fh, char **err_info)
Check for file error.
Definition file_wrappers.c:2378
file_seek
WS_WARN_UNUSED 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:1724
file_getsp
WS_DLL_PUBLIC char * file_getsp(char *buf, int len, FILE_T stream)
Read a line from the file, returning a pointer to the end.
Definition file_wrappers.c:2286
file_eof
WS_DLL_PUBLIC bool file_eof(FILE_T stream)
Check for end-of-file.
Definition file_wrappers.c:2366
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:2359
file_getc
WS_DLL_PUBLIC int file_getc(FILE_T stream)
Read the next byte from the file.
Definition file_wrappers.c:2261
file_tell
WS_DLL_PUBLIC int64_t file_tell(FILE_T stream)
Get current position in the file.
Definition file_wrappers.c:2087
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:2150
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:2214
stream
Definition stream.c:41
wtap_reader
Definition file_wrappers.c:96
wtap.h