#ifndef ZABBIX_SYSINFO_COMMON_DIR_H
#define ZABBIX_SYSINFO_COMMON_DIR_H
#include "module.h"
#include "zbxjson.h"
#define DISK_BLOCK_SIZE 512
#define SIZE_MODE_APPARENT 0
#define SIZE_MODE_DISK 1
#define TRAVERSAL_DEPTH_UNLIMITED -1
#define ZBX_FT_FILE 0x001
#define ZBX_FT_DIR 0x002
#define ZBX_FT_SYM 0x004
#define ZBX_FT_SOCK 0x008
#define ZBX_FT_BDEV 0x010
#define ZBX_FT_CDEV 0x020
#define ZBX_FT_FIFO 0x040
#define ZBX_FT_ALL 0x080
#define ZBX_FT_DEV 0x100
#define ZBX_FT_OVERFLOW 0x200
#define ZBX_FT_ALLMASK (ZBX_FT_FILE | ZBX_FT_DIR | ZBX_FT_SYM | ZBX_FT_SOCK | ZBX_FT_BDEV | ZBX_FT_CDEV | ZBX_FT_FIFO)
#define ZBX_FT_DEV2 (ZBX_FT_BDEV | ZBX_FT_CDEV)
#define ZBX_FT_FILE_STR "file"
#define ZBX_FT_DIR_STR "dir"
#define ZBX_FT_SYM_STR "sym"
#define ZBX_FT_SOCK_STR "sock"
#define ZBX_FT_BDEV_STR "bdev"
#define ZBX_FT_CDEV_STR "cdev"
#define ZBX_FT_FIFO_STR "fifo"
#define ZBX_FT_ALL_STR "all"
#define ZBX_FT_DEV_STR "dev"
typedef struct
{
int depth;
char *path;
} zbx_directory_item_t;
typedef struct
{
zbx_uint64_t st_dev;
zbx_uint64_t st_ino;
} zbx_file_descriptor_t;
int vfs_dir_size(AGENT_REQUEST *request, AGENT_RESULT *result);
int vfs_dir_count(AGENT_REQUEST *request, AGENT_RESULT *result);
int vfs_dir_get(AGENT_REQUEST *request, AGENT_RESULT *result);
int zbx_etypes_to_mask(const char *etypes, AGENT_RESULT *result);
int zbx_vfs_file_info(const char *filename, struct zbx_json *j, int array, char **error);
#endif