ncp_mount.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * ncp_mount.h
  3. *
  4. * Copyright (C) 1995, 1996 by Volker Lendecke
  5. *
  6. */
  7. #ifndef _LINUX_NCP_MOUNT_H
  8. #define _LINUX_NCP_MOUNT_H
  9. #include <linux/types.h>
  10. #include <linux/ncp.h>
  11. #define NCP_MOUNT_VERSION 3 /* Binary */
  12. /* Values for flags */
  13. #define NCP_MOUNT_SOFT 0x0001
  14. #define NCP_MOUNT_INTR 0x0002
  15. #define NCP_MOUNT_STRONG 0x0004 /* enable delete/rename of r/o files */
  16. #define NCP_MOUNT_NO_OS2 0x0008 /* do not use OS/2 (LONG) namespace */
  17. #define NCP_MOUNT_NO_NFS 0x0010 /* do not use NFS namespace */
  18. #define NCP_MOUNT_EXTRAS 0x0020
  19. #define NCP_MOUNT_SYMLINKS 0x0040 /* enable symlinks */
  20. #define NCP_MOUNT_NFS_EXTRAS 0x0080 /* Enable use of NFS NS meta-info */
  21. struct ncp_mount_data {
  22. int version;
  23. unsigned int ncp_fd; /* The socket to the ncp port */
  24. __kernel_uid_t mounted_uid; /* Who may umount() this filesystem? */
  25. __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */
  26. unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
  27. unsigned int time_out; /* How long should I wait after
  28. sending a NCP request? */
  29. unsigned int retry_count; /* And how often should I retry? */
  30. unsigned int flags;
  31. __kernel_uid_t uid;
  32. __kernel_gid_t gid;
  33. __kernel_mode_t file_mode;
  34. __kernel_mode_t dir_mode;
  35. };
  36. #define NCP_MOUNT_VERSION_V4 (4) /* Binary or text */
  37. struct ncp_mount_data_v4 {
  38. int version;
  39. unsigned long flags; /* NCP_MOUNT_* flags */
  40. /* MIPS uses long __kernel_uid_t, but... */
  41. /* we neever pass -1, so it is safe */
  42. unsigned long mounted_uid; /* Who may umount() this filesystem? */
  43. /* MIPS uses long __kernel_pid_t */
  44. long wdog_pid; /* Who cares for our watchdog packets? */
  45. unsigned int ncp_fd; /* The socket to the ncp port */
  46. unsigned int time_out; /* How long should I wait after
  47. sending a NCP request? */
  48. unsigned int retry_count; /* And how often should I retry? */
  49. /* MIPS uses long __kernel_uid_t... */
  50. /* we never pass -1, so it is safe */
  51. unsigned long uid;
  52. unsigned long gid;
  53. /* MIPS uses unsigned long __kernel_mode_t */
  54. unsigned long file_mode;
  55. unsigned long dir_mode;
  56. };
  57. #define NCP_MOUNT_VERSION_V5 (5) /* Text only */
  58. #ifdef __KERNEL__
  59. struct ncp_mount_data_kernel {
  60. unsigned long flags; /* NCP_MOUNT_* flags */
  61. unsigned int int_flags; /* internal flags */
  62. #define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001
  63. __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */
  64. struct pid *wdog_pid; /* Who cares for our watchdog packets? */
  65. unsigned int ncp_fd; /* The socket to the ncp port */
  66. unsigned int time_out; /* How long should I wait after
  67. sending a NCP request? */
  68. unsigned int retry_count; /* And how often should I retry? */
  69. unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
  70. __kernel_uid32_t uid;
  71. __kernel_gid32_t gid;
  72. __kernel_mode_t file_mode;
  73. __kernel_mode_t dir_mode;
  74. int info_fd;
  75. };
  76. #endif /* __KERNEL__ */
  77. #endif