9 #ifndef FUSE_LOWLEVEL_H_ 10 #define FUSE_LOWLEVEL_H_ 21 #ifndef FUSE_USE_VERSION 22 #error FUSE_USE_VERSION not defined 29 #include <sys/types.h> 31 #include <sys/statvfs.h> 43 #define FUSE_ROOT_ID 1 128 struct fuse_forget_data {
134 #define FUSE_SET_ATTR_MODE (1 << 0) 135 #define FUSE_SET_ATTR_UID (1 << 1) 136 #define FUSE_SET_ATTR_GID (1 << 2) 137 #define FUSE_SET_ATTR_SIZE (1 << 3) 138 #define FUSE_SET_ATTR_ATIME (1 << 4) 139 #define FUSE_SET_ATTR_MTIME (1 << 5) 140 #define FUSE_SET_ATTR_ATIME_NOW (1 << 7) 141 #define FUSE_SET_ATTR_MTIME_NOW (1 << 8) 142 #define FUSE_SET_ATTR_CTIME (1 << 10) 205 void (*destroy) (
void *userdata);
218 void (*lookup) (fuse_req_t req, fuse_ino_t parent,
const char *name);
256 void (*forget) (fuse_req_t req, fuse_ino_t
ino, uint64_t nlookup);
277 void (*getattr) (fuse_req_t req, fuse_ino_t
ino,
308 void (*setattr) (fuse_req_t req, fuse_ino_t
ino,
struct stat *
attr,
321 void (*readlink) (fuse_req_t req, fuse_ino_t
ino);
339 void (*mknod) (fuse_req_t req, fuse_ino_t parent,
const char *name,
340 mode_t mode, dev_t rdev);
354 void (*mkdir) (fuse_req_t req, fuse_ino_t parent,
const char *name,
372 void (*unlink) (fuse_req_t req, fuse_ino_t parent,
const char *name);
389 void (*rmdir) (fuse_req_t req, fuse_ino_t parent,
const char *name);
403 void (*symlink) (fuse_req_t req,
const char *link, fuse_ino_t parent,
435 void (*rename) (fuse_req_t req, fuse_ino_t parent,
const char *name,
436 fuse_ino_t newparent,
const char *newname,
451 void (*link) (fuse_req_t req, fuse_ino_t
ino, fuse_ino_t newparent,
452 const char *newname);
510 void (*open) (fuse_req_t req, fuse_ino_t
ino,
538 void (*read) (fuse_req_t req, fuse_ino_t
ino,
size_t size, off_t off,
567 void (*write) (fuse_req_t req, fuse_ino_t
ino,
const char *buf,
604 void (*
flush) (fuse_req_t req, fuse_ino_t
ino,
631 void (*release) (fuse_req_t req, fuse_ino_t
ino,
653 void (*fsync) (fuse_req_t req, fuse_ino_t
ino,
int datasync,
677 void (*opendir) (fuse_req_t req, fuse_ino_t
ino,
707 void (*readdir) (fuse_req_t req, fuse_ino_t
ino,
size_t size, off_t off,
726 void (*releasedir) (fuse_req_t req, fuse_ino_t
ino,
751 void (*fsyncdir) (fuse_req_t req, fuse_ino_t
ino,
int datasync,
764 void (*statfs) (fuse_req_t req, fuse_ino_t
ino);
777 void (*setxattr) (fuse_req_t req, fuse_ino_t
ino,
const char *name,
778 const char *value,
size_t size,
int flags);
808 void (*getxattr) (fuse_req_t req, fuse_ino_t
ino,
const char *name,
839 void (*listxattr) (fuse_req_t req, fuse_ino_t
ino,
size_t size);
856 void (*removexattr) (fuse_req_t req, fuse_ino_t
ino,
const char *name);
878 void (*access) (fuse_req_t req, fuse_ino_t
ino,
int mask);
907 void (*create) (fuse_req_t req, fuse_ino_t parent,
const char *name,
922 void (*getlk) (fuse_req_t req, fuse_ino_t
ino,
947 void (*setlk) (fuse_req_t req, fuse_ino_t
ino,
949 struct flock *lock,
int sleep);
971 void (*bmap) (fuse_req_t req, fuse_ino_t
ino,
size_t blocksize,
999 void (*ioctl) (fuse_req_t req, fuse_ino_t
ino,
int cmd,
void *arg,
1001 const void *in_buf,
size_t in_bufsz,
size_t out_bufsz);
1033 struct fuse_pollhandle *ph);
1062 void (*write_buf) (fuse_req_t req, fuse_ino_t
ino,
1078 void (*retrieve_reply) (fuse_req_t req,
void *cookie, fuse_ino_t
ino,
1092 void (*forget_multi) (fuse_req_t req,
size_t count,
1093 struct fuse_forget_data *forgets);
1110 void (*flock) (fuse_req_t req, fuse_ino_t
ino,
1133 void (*fallocate) (fuse_req_t req, fuse_ino_t
ino,
int mode,
1161 void (*readdirplus) (fuse_req_t req, fuse_ino_t
ino,
size_t size, off_t off,
1299 int fuse_reply_buf(fuse_req_t req,
const char *buf,
size_t size);
1358 int fuse_reply_iov(fuse_req_t req,
const struct iovec *iov,
int count);
1440 const char *name,
const struct stat *stbuf,
1476 const struct iovec *in_iov,
size_t in_count,
1477 const struct iovec *out_iov,
size_t out_count);
1490 int fuse_reply_ioctl(fuse_req_t req,
int result,
const void *buf,
size_t size);
1542 off_t off, off_t len);
1563 const char *name,
size_t namelen);
1590 fuse_ino_t parent, fuse_ino_t child,
1591 const char *name,
size_t namelen);
1651 size_t size, off_t offset,
void *cookie);
1754 struct fuse_cmdline_opts {
1758 int nodefault_subtype;
1763 unsigned int max_idle_threads;
1785 struct fuse_cmdline_opts *opts);
1817 size_t op_size,
void *userdata);
1864 #if FUSE_USE_VERSION < 32 1866 #define fuse_session_loop_mt(se, clone_fd) fuse_session_loop_mt_31(se, clone_fd) 1868 int fuse_session_loop_mt(
struct fuse_session *se,
struct fuse_loop_config *config);
int fuse_parse_cmdline(struct fuse_args *args, struct fuse_cmdline_opts *opts)
int fuse_session_receive_buf(struct fuse_session *se, struct fuse_buf *buf)
void fuse_session_process_buf(struct fuse_session *se, const struct fuse_buf *buf)
int fuse_reply_write(fuse_req_t req, size_t count)
void fuse_session_reset(struct fuse_session *se)
struct fuse_req * fuse_req_t
int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent, const char *name, size_t namelen)
int fuse_reply_iov(fuse_req_t req, const struct iovec *iov, int count)
const struct fuse_ctx * fuse_req_ctx(fuse_req_t req)
void fuse_session_unmount(struct fuse_session *se)
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_data(fuse_req_t req, struct fuse_bufvec *bufv, enum fuse_buf_copy_flags flags)
int fuse_reply_ioctl(fuse_req_t req, int result, const void *buf, size_t size)
int fuse_session_loop(struct fuse_session *se)
int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e)
int fuse_session_mount(struct fuse_session *se, const char *mountpoint)
int fuse_reply_statfs(fuse_req_t req, const struct statvfs *stbuf)
int fuse_reply_ioctl_iov(fuse_req_t req, int result, const struct iovec *iov, int count)
void fuse_lowlevel_help(void)
int fuse_req_interrupted(fuse_req_t req)
int fuse_reply_poll(fuse_req_t req, unsigned revents)
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_err(fuse_req_t req, int err)
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_cmdline_help(void)
void * fuse_req_userdata(fuse_req_t req)
int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd)
void fuse_reply_none(fuse_req_t req)
int fuse_session_exited(struct fuse_session *se)
void fuse_session_destroy(struct fuse_session *se)
int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *fi)
void fuse_session_exit(struct fuse_session *se)
int fuse_reply_readlink(fuse_req_t req, const char *link)
void(* fuse_interrupt_func_t)(fuse_req_t req, void *data)
int fuse_reply_attr(fuse_req_t req, const struct stat *attr, double attr_timeout)
void fuse_req_interrupt_func(fuse_req_t req, fuse_interrupt_func_t func, void *data)
int fuse_req_getgroups(fuse_req_t req, int size, gid_t list[])
int fuse_reply_lock(fuse_req_t req, const struct flock *lock)
int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e, const struct fuse_file_info *fi)
struct fuse_session * fuse_session_new(struct fuse_args *args, const struct fuse_lowlevel_ops *op, size_t op_size, void *userdata)
int fuse_session_fd(struct fuse_session *se)
int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino, size_t size, off_t offset, void *cookie)
int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino, off_t off, off_t len)
void fuse_lowlevel_version(void)
int fuse_reply_bmap(fuse_req_t req, uint64_t idx)
int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph)
int fuse_reply_buf(fuse_req_t req, const char *buf, size_t size)
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_xattr(fuse_req_t req, size_t count)
int fuse_lowlevel_notify_delete(struct fuse_session *se, fuse_ino_t parent, fuse_ino_t child, const char *name, size_t namelen)