auto_fs4.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* -*- c -*-
  2. * linux/include/linux/auto_fs4.h
  3. *
  4. * Copyright 1999-2000 Jeremy Fitzhardinge <jeremy@goop.org>
  5. *
  6. * This file is part of the Linux kernel and is made available under
  7. * the terms of the GNU General Public License, version 2, or at your
  8. * option, any later version, incorporated herein by reference.
  9. */
  10. #ifndef _LINUX_AUTO_FS4_H
  11. #define _LINUX_AUTO_FS4_H
  12. /* Include common v3 definitions */
  13. #include <linux/auto_fs.h>
  14. /* autofs v4 definitions */
  15. #undef AUTOFS_PROTO_VERSION
  16. #undef AUTOFS_MIN_PROTO_VERSION
  17. #undef AUTOFS_MAX_PROTO_VERSION
  18. #define AUTOFS_PROTO_VERSION 5
  19. #define AUTOFS_MIN_PROTO_VERSION 3
  20. #define AUTOFS_MAX_PROTO_VERSION 5
  21. #define AUTOFS_PROTO_SUBVERSION 0
  22. /* Mask for expire behaviour */
  23. #define AUTOFS_EXP_IMMEDIATE 1
  24. #define AUTOFS_EXP_LEAVES 2
  25. /* Daemon notification packet types */
  26. enum autofs_notify {
  27. NFY_NONE,
  28. NFY_MOUNT,
  29. NFY_EXPIRE
  30. };
  31. /* Kernel protocol version 4 packet types */
  32. /* Expire entry (umount request) */
  33. #define autofs_ptype_expire_multi 2
  34. /* Kernel protocol version 5 packet types */
  35. /* Indirect mount missing and expire requests. */
  36. #define autofs_ptype_missing_indirect 3
  37. #define autofs_ptype_expire_indirect 4
  38. /* Direct mount missing and expire requests */
  39. #define autofs_ptype_missing_direct 5
  40. #define autofs_ptype_expire_direct 6
  41. /* v4 multi expire (via pipe) */
  42. struct autofs_packet_expire_multi {
  43. struct autofs_packet_hdr hdr;
  44. autofs_wqt_t wait_queue_token;
  45. int len;
  46. char name[NAME_MAX+1];
  47. };
  48. /* autofs v5 common packet struct */
  49. struct autofs_v5_packet {
  50. struct autofs_packet_hdr hdr;
  51. autofs_wqt_t wait_queue_token;
  52. __u32 dev;
  53. __u64 ino;
  54. __u32 uid;
  55. __u32 gid;
  56. __u32 pid;
  57. __u32 tgid;
  58. __u32 len;
  59. char name[NAME_MAX+1];
  60. };
  61. typedef struct autofs_v5_packet autofs_packet_missing_indirect_t;
  62. typedef struct autofs_v5_packet autofs_packet_expire_indirect_t;
  63. typedef struct autofs_v5_packet autofs_packet_missing_direct_t;
  64. typedef struct autofs_v5_packet autofs_packet_expire_direct_t;
  65. union autofs_packet_union {
  66. struct autofs_packet_hdr hdr;
  67. struct autofs_packet_missing missing;
  68. struct autofs_packet_expire expire;
  69. struct autofs_packet_expire_multi expire_multi;
  70. struct autofs_v5_packet v5_packet;
  71. };
  72. #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int)
  73. #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI
  74. #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI
  75. #define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int)
  76. #define AUTOFS_IOC_ASKREGHOST _IOR(0x93,0x68,int)
  77. #define AUTOFS_IOC_TOGGLEREGHOST _IOR(0x93,0x69,int)
  78. #define AUTOFS_IOC_ASKUMOUNT _IOR(0x93,0x70,int)
  79. #endif /* _LINUX_AUTO_FS4_H */