| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Macros | Typedefs
file_util.h File Reference
`#include <stdbool.h>`
`#include "ws_symbol_export.h"`
`#include <fcntl.h>`
`#include <sys/stat.h>`
`#include <stdio.h>`

Go to the source code of this file.

## Macros
#define | IO_BUF_SIZE (64 * 1024)
#define | S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
#define | S_IFIFO _S_IFIFO
#define | S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
#define | S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#define | ws_statb64 struct stat
#define | ws_open open
#define | ws_rename rename
#define | ws_mkdir(dir, mode) mkdir(dir,mode)
#define | ws_stat64 stat
#define | ws_unlink unlink
#define | ws_remove remove
#define | ws_fopen fopen
#define | ws_freopen freopen
#define | ws_read read
#define | ws_write write
#define | ws_close close
#define | ws_close_if_possible ws_close
#define | ws_dup dup
#define | ws_fseek64(fh, offset, whence) fseek(fh,(long)(offset),whence)
#define | ws_ftell64 ftell
#define | ws_fstat64 fstat /* AC_SYS_LARGEFILE should make off_t 64-bit */
#define | ws_lseek64 lseek /* AC_SYS_LARGEFILE should make off_t 64-bit */
#define | ws_fdopen fdopen
#define | ws_fileno fileno
#define | ws_isatty isatty
#define | ws_getc_unlocked getc_unlocked
#define | O_BINARY 0 /* Win32 needs the O_BINARY flag for open() */
#define | ws_getpid getpid
#define | ws_umask umask
#define | WS_DIR GDir
#define | WS_DIRENT const char
#define | ws_dir_open g_dir_open
#define | ws_dir_read_name g_dir_read_name
#define | ws_dir_get_name(dirent) dirent
#define | ws_dir_rewind g_dir_rewind
#define | ws_dir_close g_dir_close
#define | FILE_ERR_CANT_OPEN -1
#define | FILE_ERR_CANT_WRITE -2
#define | FILE_ERR_SHORT_WRITE -3
#define | FILE_ERR_CANT_CLOSE -4
#define | FILE_ERR_INTERNAL -5

## Typedefs
typedef size_t | ws_file_size_t
typedef ssize_t | ws_file_ssize_t

## Detailed Description

File utility definitions

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later