fuse.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. FUSE: Filesystem in Userspace
  3. Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu>
  4. This program can be distributed under the terms of the GNU GPL.
  5. See the file COPYING.
  6. */
  7. /* This file defines the kernel interface of FUSE */
  8. #include <asm/types.h>
  9. /** Version number of this interface */
  10. #define FUSE_KERNEL_VERSION 6
  11. /** Minor version number of this interface */
  12. #define FUSE_KERNEL_MINOR_VERSION 1
  13. /** The node ID of the root inode */
  14. #define FUSE_ROOT_ID 1
  15. /** The major number of the fuse character device */
  16. #define FUSE_MAJOR 10
  17. /** The minor number of the fuse character device */
  18. #define FUSE_MINOR 229
  19. struct fuse_attr {
  20. __u64 ino;
  21. __u64 size;
  22. __u64 blocks;
  23. __u64 atime;
  24. __u64 mtime;
  25. __u64 ctime;
  26. __u32 atimensec;
  27. __u32 mtimensec;
  28. __u32 ctimensec;
  29. __u32 mode;
  30. __u32 nlink;
  31. __u32 uid;
  32. __u32 gid;
  33. __u32 rdev;
  34. };
  35. enum fuse_opcode {
  36. FUSE_INIT = 26
  37. };
  38. /* Conservative buffer size for the client */
  39. #define FUSE_MAX_IN 8192
  40. struct fuse_init_in_out {
  41. __u32 major;
  42. __u32 minor;
  43. };
  44. struct fuse_in_header {
  45. __u32 len;
  46. __u32 opcode;
  47. __u64 unique;
  48. __u64 nodeid;
  49. __u32 uid;
  50. __u32 gid;
  51. __u32 pid;
  52. };
  53. struct fuse_out_header {
  54. __u32 len;
  55. __s32 error;
  56. __u64 unique;
  57. };