nfs2.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * NFS protocol definitions
  3. *
  4. * This file contains constants for Version 2 of the protocol.
  5. */
  6. #ifndef _LINUX_NFS2_H
  7. #define _LINUX_NFS2_H
  8. #define NFS2_PORT 2049
  9. #define NFS2_MAXDATA 8192
  10. #define NFS2_MAXPATHLEN 1024
  11. #define NFS2_MAXNAMLEN 255
  12. #define NFS2_MAXGROUPS 16
  13. #define NFS2_FHSIZE 32
  14. #define NFS2_COOKIESIZE 4
  15. #define NFS2_FIFO_DEV (-1)
  16. #define NFS2MODE_FMT 0170000
  17. #define NFS2MODE_DIR 0040000
  18. #define NFS2MODE_CHR 0020000
  19. #define NFS2MODE_BLK 0060000
  20. #define NFS2MODE_REG 0100000
  21. #define NFS2MODE_LNK 0120000
  22. #define NFS2MODE_SOCK 0140000
  23. #define NFS2MODE_FIFO 0010000
  24. /* NFSv2 file types - beware, these are not the same in NFSv3 */
  25. enum nfs2_ftype {
  26. NF2NON = 0,
  27. NF2REG = 1,
  28. NF2DIR = 2,
  29. NF2BLK = 3,
  30. NF2CHR = 4,
  31. NF2LNK = 5,
  32. NF2SOCK = 6,
  33. NF2BAD = 7,
  34. NF2FIFO = 8
  35. };
  36. struct nfs2_fh {
  37. char data[NFS2_FHSIZE];
  38. };
  39. /*
  40. * Procedure numbers for NFSv2
  41. */
  42. #define NFS2_VERSION 2
  43. #define NFSPROC_NULL 0
  44. #define NFSPROC_GETATTR 1
  45. #define NFSPROC_SETATTR 2
  46. #define NFSPROC_ROOT 3
  47. #define NFSPROC_LOOKUP 4
  48. #define NFSPROC_READLINK 5
  49. #define NFSPROC_READ 6
  50. #define NFSPROC_WRITECACHE 7
  51. #define NFSPROC_WRITE 8
  52. #define NFSPROC_CREATE 9
  53. #define NFSPROC_REMOVE 10
  54. #define NFSPROC_RENAME 11
  55. #define NFSPROC_LINK 12
  56. #define NFSPROC_SYMLINK 13
  57. #define NFSPROC_MKDIR 14
  58. #define NFSPROC_RMDIR 15
  59. #define NFSPROC_READDIR 16
  60. #define NFSPROC_STATFS 17
  61. #endif /* _LINUX_NFS2_H */