9#ifndef FUSE_LOWLEVEL_H_
10#define FUSE_LOWLEVEL_H_
21#ifndef FUSE_USE_VERSION
22#error FUSE_USE_VERSION not defined
31#include <sys/statvfs.h>
125struct fuse_forget_data {
130struct fuse_custom_io {
131 ssize_t (*writev)(
int fd,
struct iovec *iov,
int count,
void *userdata);
132 ssize_t (*read)(
int fd,
void *buf,
size_t buf_len,
void *userdata);
133 ssize_t (*splice_receive)(
int fdin, off_t *offin,
int fdout,
134 off_t *offout,
size_t len,
135 unsigned int flags,
void *userdata);
136 ssize_t (*splice_send)(
int fdin, off_t *offin,
int fdout,
137 off_t *offout,
size_t len,
138 unsigned int flags,
void *userdata);
147 FUSE_LL_INVALIDATE = 0,
148 FUSE_LL_EXPIRE_ONLY = (1 << 0),
152#define FUSE_SET_ATTR_MODE (1 << 0)
153#define FUSE_SET_ATTR_UID (1 << 1)
154#define FUSE_SET_ATTR_GID (1 << 2)
155#define FUSE_SET_ATTR_SIZE (1 << 3)
156#define FUSE_SET_ATTR_ATIME (1 << 4)
157#define FUSE_SET_ATTR_MTIME (1 << 5)
158#define FUSE_SET_ATTR_ATIME_NOW (1 << 7)
159#define FUSE_SET_ATTR_MTIME_NOW (1 << 8)
160#define FUSE_SET_ATTR_FORCE (1 << 9)
161#define FUSE_SET_ATTR_CTIME (1 << 10)
162#define FUSE_SET_ATTR_KILL_SUID (1 << 11)
163#define FUSE_SET_ATTR_KILL_SGID (1 << 12)
164#define FUSE_SET_ATTR_FILE (1 << 13)
165#define FUSE_SET_ATTR_KILL_PRIV (1 << 14)
166#define FUSE_SET_ATTR_OPEN (1 << 15)
167#define FUSE_SET_ATTR_TIMES_SET (1 << 16)
168#define FUSE_SET_ATTR_TOUCH (1 << 17)
372 mode_t mode, dev_t rdev);
484 const char *newname);
832 const char *value,
size_t size,
int flags);
1003 struct flock *lock,
int sleep);
1028#if FUSE_USE_VERSION < 35
1031 const void *in_buf,
size_t in_bufsz,
size_t out_bufsz);
1063 const void *in_buf,
size_t in_bufsz,
size_t out_bufsz);
1096 struct fuse_pollhandle *ph);
1156 struct fuse_forget_data *forgets);
1367 double attr_timeout);
1560 const char *name,
const struct stat *stbuf,
1596 const struct iovec *in_iov,
size_t in_count,
1597 const struct iovec *out_iov,
size_t out_count);
1683 off_t off, off_t len);
1710 const char *name,
size_t namelen);
1741 const char *name,
size_t namelen);
1773 const char *name,
size_t namelen);
1833 size_t size, off_t offset,
void *cookie);
1945 int nodefault_subtype;
1950 unsigned int max_idle_threads;
1954 unsigned int max_threads;
1975#if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
1976int fuse_parse_cmdline(
struct fuse_args *args,
1979#if FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12)
1982#define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_30(args, opts)
1984int fuse_parse_cmdline_312(
struct fuse_args *args,
1986#define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts)
2020 size_t op_size,
void *userdata);
2050 const struct fuse_custom_io *io,
int fd);
2086#if FUSE_USE_VERSION < 32
2087 int fuse_session_loop_mt_31(
struct fuse_session *se,
int clone_fd);
2088 #define fuse_session_loop_mt(se, clone_fd) fuse_session_loop_mt_31(se, clone_fd)
2089#elif FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12)
2090 int fuse_session_loop_mt_32(
struct fuse_session *se,
struct fuse_loop_config *config);
2091 #define fuse_session_loop_mt(se, config) fuse_session_loop_mt_32(se, config)
2093 #if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
2105 int fuse_session_loop_mt(
struct fuse_session *se,
struct fuse_loop_config *config);
2107 int fuse_session_loop_mt_312(
struct fuse_session *se,
struct fuse_loop_config *config);
2108 #define fuse_session_loop_mt(se, config) fuse_session_loop_mt_312(se, config)
void fuse_session_destroy(struct fuse_session *se)
int fuse_reply_data(fuse_req_t req, struct fuse_bufvec *bufv, enum fuse_buf_copy_flags flags)
int fuse_reply_lock(fuse_req_t req, const struct flock *lock)
int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *fi)
void fuse_session_exit(struct fuse_session *se)
void(* fuse_interrupt_func_t)(fuse_req_t req, void *data)
int fuse_reply_poll(fuse_req_t req, unsigned revents)
int fuse_reply_err(fuse_req_t req, int err)
const struct fuse_ctx * fuse_req_ctx(fuse_req_t req)
void * fuse_req_userdata(fuse_req_t req)
int fuse_reply_buf(fuse_req_t req, const char *buf, size_t size)
struct fuse_req * fuse_req_t
size_t fuse_add_direntry_plus(fuse_req_t req, char *buf, size_t bufsize, const char *name, const struct fuse_entry_param *e, off_t off)
int fuse_reply_ioctl_iov(fuse_req_t req, int result, const struct iovec *iov, int count)
int fuse_lowlevel_notify_delete(struct fuse_session *se, fuse_ino_t parent, fuse_ino_t child, const char *name, size_t namelen)
void fuse_session_process_buf(struct fuse_session *se, const struct fuse_buf *buf)
int fuse_session_exited(struct fuse_session *se)
int fuse_session_fd(struct fuse_session *se)
int fuse_req_interrupted(fuse_req_t req)
int fuse_req_getgroups(fuse_req_t req, int size, gid_t list[])
int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino, size_t size, off_t offset, void *cookie)
int fuse_reply_readlink(fuse_req_t req, const char *link)
int fuse_session_loop(struct fuse_session *se)
int fuse_reply_iov(fuse_req_t req, const struct iovec *iov, int count)
int fuse_reply_bmap(fuse_req_t req, uint64_t idx)
int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e)
void fuse_session_unmount(struct fuse_session *se)
void fuse_cmdline_help(void)
struct fuse_session * fuse_session_new(struct fuse_args *args, const struct fuse_lowlevel_ops *op, size_t op_size, void *userdata)
void fuse_reply_none(fuse_req_t req)
int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent, const char *name, size_t namelen)
int fuse_reply_ioctl_retry(fuse_req_t req, const struct iovec *in_iov, size_t in_count, const struct iovec *out_iov, size_t out_count)
void fuse_lowlevel_help(void)
int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino, off_t off, off_t len)
int fuse_reply_statfs(fuse_req_t req, const struct statvfs *stbuf)
int fuse_reply_write(fuse_req_t req, size_t count)
int fuse_session_receive_buf(struct fuse_session *se, struct fuse_buf *buf)
int fuse_session_mount(struct fuse_session *se, const char *mountpoint)
int fuse_parse_cmdline_30(struct fuse_args *args, struct fuse_cmdline_opts *opts)
int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph)
int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent, const char *name, size_t namelen)
void fuse_req_interrupt_func(fuse_req_t req, fuse_interrupt_func_t func, void *data)
void fuse_session_reset(struct fuse_session *se)
int fuse_session_custom_io(struct fuse_session *se, const struct fuse_custom_io *io, int fd)
int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e, const struct fuse_file_info *fi)
int fuse_reply_lseek(fuse_req_t req, off_t off)
void fuse_lowlevel_version(void)
size_t fuse_add_direntry(fuse_req_t req, char *buf, size_t bufsize, const char *name, const struct stat *stbuf, off_t off)
int fuse_reply_attr(fuse_req_t req, const struct stat *attr, double attr_timeout)
int fuse_reply_ioctl(fuse_req_t req, int result, const void *buf, size_t size)
int fuse_lowlevel_notify_store(struct fuse_session *se, fuse_ino_t ino, off_t offset, struct fuse_bufvec *bufv, enum fuse_buf_copy_flags flags)
int fuse_reply_xattr(fuse_req_t req, size_t count)
void(* fsync)(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
void(* bmap)(fuse_req_t req, fuse_ino_t ino, size_t blocksize, uint64_t idx)
void(* unlink)(fuse_req_t req, fuse_ino_t parent, const char *name)
void(* getxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
void(* rename)(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, const char *newname, unsigned int flags)
void(* releasedir)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
void(* setxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, const char *value, size_t size, int flags)
void(* write_buf)(fuse_req_t req, fuse_ino_t ino, struct fuse_bufvec *bufv, off_t off, struct fuse_file_info *fi)
void(* symlink)(fuse_req_t req, const char *link, fuse_ino_t parent, const char *name)
void(* statfs)(fuse_req_t req, fuse_ino_t ino)
void(* release)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
void(* readdir)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
void(* fallocate)(fuse_req_t req, fuse_ino_t ino, int mode, off_t offset, off_t length, struct fuse_file_info *fi)
void(* create)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, struct fuse_file_info *fi)
void(* link)(fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, const char *newname)
void(* write)(fuse_req_t req, fuse_ino_t ino, const char *buf, size_t size, off_t off, struct fuse_file_info *fi)
void(* lookup)(fuse_req_t req, fuse_ino_t parent, const char *name)
void(* readdirplus)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
void(* flock)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, int op)
void(* getattr)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
void(* copy_file_range)(fuse_req_t req, fuse_ino_t ino_in, off_t off_in, struct fuse_file_info *fi_in, fuse_ino_t ino_out, off_t off_out, struct fuse_file_info *fi_out, size_t len, int flags)
void(* setattr)(fuse_req_t req, fuse_ino_t ino, struct stat *attr, int to_set, struct fuse_file_info *fi)
void(* open)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
void(* removexattr)(fuse_req_t req, fuse_ino_t ino, const char *name)
void(* forget)(fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)
void(* poll)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct fuse_pollhandle *ph)
void(* ioctl)(fuse_req_t req, fuse_ino_t ino, unsigned int cmd, void *arg, struct fuse_file_info *fi, unsigned flags, const void *in_buf, size_t in_bufsz, size_t out_bufsz)
void(* rmdir)(fuse_req_t req, fuse_ino_t parent, const char *name)
void(* init)(void *userdata, struct fuse_conn_info *conn)
void(* setlk)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock, int sleep)
void(* retrieve_reply)(fuse_req_t req, void *cookie, fuse_ino_t ino, off_t offset, struct fuse_bufvec *bufv)
void(* fsyncdir)(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
void(* destroy)(void *userdata)
void(* mkdir)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode)
void(* access)(fuse_req_t req, fuse_ino_t ino, int mask)
void(* mknod)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, dev_t rdev)
void(* lseek)(fuse_req_t req, fuse_ino_t ino, off_t off, int whence, struct fuse_file_info *fi)
void(* getlk)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock)
void(* readlink)(fuse_req_t req, fuse_ino_t ino)
void(* read)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
void(* flush)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
void(* listxattr)(fuse_req_t req, fuse_ino_t ino, size_t size)
void(* opendir)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
void(* forget_multi)(fuse_req_t req, size_t count, struct fuse_forget_data *forgets)