10 #define __WTAP_INT_H__ 19 #include <wsutil/file_util.h> 22 #include "wtap_opttypes.h" 25 int wtap_fstat(
wtap *wth, ws_statb64 *statb,
int *err);
27 typedef gboolean (*subtype_read_func)(
struct wtap*,
int*,
char**, gint64*);
28 typedef gboolean (*subtype_seek_read_func)(
struct wtap*, gint64,
wtap_rec *,
38 int file_type_subtype;
39 guint snapshot_length;
49 subtype_read_func subtype_read;
50 subtype_seek_read_func subtype_seek_read;
51 void (*subtype_sequential_close)(
struct wtap*);
52 void (*subtype_close)(
struct wtap*);
69 wtap_new_ipv4_callback_t add_new_ipv4;
70 wtap_new_ipv6_callback_t add_new_ipv6;
79 typedef void *WFILE_T;
81 typedef gboolean (*subtype_write_func)(
struct wtap_dumper*,
83 const guint8*,
int*, gchar**);
84 typedef gboolean (*subtype_finish_func)(
struct wtap_dumper*,
int*);
88 int file_type_subtype;
92 gboolean needs_reload;
98 subtype_write_func subtype_write;
99 subtype_finish_func subtype_finish;
107 WS_DLL_PUBLIC gboolean wtap_dump_file_write(
wtap_dumper *wdh,
const void *buf,
108 size_t bufsize,
int *err);
109 WS_DLL_PUBLIC gint64 wtap_dump_file_seek(
wtap_dumper *wdh, gint64 offset,
int whence,
int *err);
110 WS_DLL_PUBLIC gint64 wtap_dump_file_tell(
wtap_dumper *wdh,
int *err);
113 extern gint wtap_num_file_types;
115 #include <wsutil/pint.h> 120 #define PBSWAP64(p) \ 136 #define PBSWAP32(p) \ 146 #define PBSWAP16(p) \ 160 #define phtons(p, v) \ 162 (p)[0] = (guint8)((v) >> 8); \ 163 (p)[1] = (guint8)((v) >> 0); \ 168 #define phton24(p, v) \ 170 (p)[0] = (guint8)((v) >> 16); \ 171 (p)[1] = (guint8)((v) >> 8); \ 172 (p)[2] = (guint8)((v) >> 0); \ 177 #define phtonl(p, v) \ 179 (p)[0] = (guint8)((v) >> 24); \ 180 (p)[1] = (guint8)((v) >> 16); \ 181 (p)[2] = (guint8)((v) >> 8); \ 182 (p)[3] = (guint8)((v) >> 0); \ 187 #define phtonll(p, v) \ 189 (p)[0] = (guint8)((v) >> 56); \ 190 (p)[1] = (guint8)((v) >> 48); \ 191 (p)[2] = (guint8)((v) >> 40); \ 192 (p)[3] = (guint8)((v) >> 32); \ 193 (p)[4] = (guint8)((v) >> 24); \ 194 (p)[5] = (guint8)((v) >> 16); \ 195 (p)[6] = (guint8)((v) >> 8); \ 196 (p)[7] = (guint8)((v) >> 0); \ 201 #define phtole8(p, v) \ 203 (p)[0] = (guint8)((v) >> 0); \ 208 #define phtoles(p, v) \ 210 (p)[0] = (guint8)((v) >> 0); \ 211 (p)[1] = (guint8)((v) >> 8); \ 216 #define phtole24(p, v) \ 218 (p)[0] = (guint8)((v) >> 0); \ 219 (p)[1] = (guint8)((v) >> 8); \ 220 (p)[2] = (guint8)((v) >> 16); \ 225 #define phtolel(p, v) \ 227 (p)[0] = (guint8)((v) >> 0); \ 228 (p)[1] = (guint8)((v) >> 8); \ 229 (p)[2] = (guint8)((v) >> 16); \ 230 (p)[3] = (guint8)((v) >> 24); \ 235 #define phtolell(p, v) \ 237 (p)[0] = (guint8)((v) >> 0); \ 238 (p)[1] = (guint8)((v) >> 8); \ 239 (p)[2] = (guint8)((v) >> 16); \ 240 (p)[3] = (guint8)((v) >> 24); \ 241 (p)[4] = (guint8)((v) >> 32); \ 242 (p)[5] = (guint8)((v) >> 40); \ 243 (p)[6] = (guint8)((v) >> 48); \ 244 (p)[7] = (guint8)((v) >> 56); \ 249 #ifndef g_ptr_array_len 250 #define g_ptr_array_len(a) ((a)->len) 257 extern const char *compressed_file_extension_table[];
277 wtap_read_bytes_or_eof(
FILE_T fh,
void *buf,
unsigned int count,
int *err,
295 wtap_read_bytes(
FILE_T fh,
void *buf,
unsigned int count,
int *err,
309 wtap_read_packet_bytes(
FILE_T fh, Buffer *buf, guint length,
int *err,
FILE_T random_fh
Definition: wtap-int.h:36
Definition: wtap-int.h:34
addrinfo_lists_t * addrinfo_lists
Definition: wtap-int.h:101
GArray * interface_data
Definition: wtap-int.h:104
GArray * interface_data
Definition: wtap-int.h:43
GArray * nrb_hdrs
Definition: wtap-int.h:103
GArray * nrb_hdrs
Definition: wtap-int.h:44
gboolean ispipe
Definition: wtap-int.h:37
Definition: file_wrappers.c:78
Definition: wtap-int.h:86