/core/10.4/fusefs/common/fuse_ioctl.h

http://macfuse.googlecode.com/ · C++ Header · 64 lines · 27 code · 15 blank · 22 comment · 0 complexity · 7af6e01fe70d5624490029e91c9cdd8d MD5 · raw file

  1. /*
  2. * Copyright (C) 2006-2008 Google. All Rights Reserved.
  3. * Amit Singh <singh@>
  4. */
  5. #ifndef _FUSE_IOCTL_H_
  6. #define _FUSE_IOCTL_H_
  7. #include <stdint.h>
  8. #include <sys/ioctl.h>
  9. /* FUSEDEVIOCxxx */
  10. /* Get mounter's pid. */
  11. #define FUSEDEVGETMOUNTERPID _IOR('F', 1, u_int32_t)
  12. /* Check if FUSE_INIT kernel-user handshake is complete. */
  13. #define FUSEDEVIOCGETHANDSHAKECOMPLETE _IOR('F', 2, u_int32_t)
  14. /* Mark the daemon as dead. */
  15. #define FUSEDEVIOCSETDAEMONDEAD _IOW('F', 3, u_int32_t)
  16. /* Tell the kernel which operations the daemon implements. */
  17. #define FUSEDEVIOCSETIMPLEMENTEDBITS _IOW('F', 4, u_int64_t)
  18. /* Get device's random "secret". */
  19. #define FUSEDEVIOCGETRANDOM _IOR('F', 5, u_int32_t)
  20. /*
  21. * The 'AVFI' (alter-vnode-for-inode) ioctls all require an inode number
  22. * as an argument. In the user-space library, you can get the inode number
  23. * from a path by using fuse_lookup_inode_by_path_np() [lib/fuse.c].
  24. *
  25. * To see an example of using this, see the implementation of
  26. * fuse_purge_path_np() in lib/fuse_darwin.c.
  27. */
  28. struct fuse_avfi_ioctl {
  29. uint64_t inode;
  30. uint64_t cmd;
  31. uint32_t ubc_flags;
  32. uint32_t note;
  33. off_t size;
  34. };
  35. /* Alter the vnode (if any) specified by the given inode. */
  36. #define FUSEDEVIOCALTERVNODEFORINODE _IOW('F', 6, struct fuse_avfi_ioctl)
  37. #define FSCTLALTERVNODEFORINODE IOCBASECMD(FUSEDEVIOCALTERVNODEFORINODE)
  38. /*
  39. * Possible cmd values for AVFI.
  40. */
  41. #define FUSE_AVFI_MARKGONE 0x00000001 /* no ubc_flags */
  42. #define FUSE_AVFI_PURGEATTRCACHE 0x00000002 /* no ubc_flags */
  43. #define FUSE_AVFI_PURGEVNCACHE 0x00000004 /* no ubc_flags */
  44. #define FUSE_AVFI_UBC 0x00000008 /* uses ubc_flags */
  45. #define FUSE_AVFI_UBC_SETSIZE 0x00000010 /* uses ubc_flags, size */
  46. #define FUSE_AVFI_KNOTE 0x00000020 /* uses note */
  47. #define FUSE_SETACLSTATE _IOW('h', 10, int32_t)
  48. #define FSCTLSETACLSTATE IOCBASECMD(FUSE_SETACLSTATE)
  49. #endif /* _FUSE_IOCTL_H_ */