Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
3.5 KiB

  1. /* BREAK <Current directory list structure>
  2. *
  3. *
  4. * Microsoft Confidential
  5. * Copyright (C) Microsoft Corporation 1991
  6. * All Rights Reserved.
  7. *
  8. *
  9. * CDS - Current Directory Structure
  10. *
  11. * CDS items are used bu the internal routines to store cluster numbers and
  12. * network identifiers for each logical name. The ID field is used dually,
  13. * both as net ID and for a cluster number for local devices. In the case
  14. * of local devices, the cluster number will be -1 if there is a potential
  15. * of the disk being changed or if the path must be recracked.
  16. *
  17. * Some pathnames have special preambles, such as
  18. *
  19. * \\machane\sharename\...
  20. * For these pathnames we can't allow ".." processing to back us
  21. * up into the special front part of the name. The CURDIR_END field
  22. * holds the address of the seperator character which marks
  23. * the split between the special preamble and the regular
  24. * path list; ".." processing isn't allowed to back us up past
  25. * (i.e., before) CURDIR_END
  26. * For the root, it points at the leading /. For net
  27. * assignments it points at the end (nul) of the initial assignment:
  28. * A:/ \\foo\bar \\foo\bar\blech\bozo
  29. * ^ ^ ^
  30. */
  31. #define DIRSTRLEN 64+3 // Max length in bytes of directory strings
  32. #define TEMPLEN DIRSTRLEN*2
  33. /* XLATOFF */
  34. #pragma pack(1)
  35. /* XLATON */
  36. typedef struct CURDIR_LIST {
  37. CHAR CurDir_Text[DIRSTRLEN]; // text of assignment and curdir
  38. USHORT CurDir_Flags; // various flags
  39. USHORT CurDir_End; // index to ".." backup limit -
  40. } CDS; // see above
  41. typedef CDS UNALIGNED *PCDS;
  42. #define curdirLen sizeof(CURDIR_LIST) // Needed for
  43. // ASM87 which doesn't allow
  44. // Size directive as a macro
  45. // argument
  46. typedef struct CURDIR_LIST_JPN {
  47. CHAR CurDirJPN_Text[DIRSTRLEN]; // text of assignment and curdir
  48. USHORT CurDirJPN_Flags; // various flags
  49. USHORT CurDirJPN_End; // index to ".." backup limit -
  50. CHAR CurDirJPN_Reserve[17]; // Reserved for application compatibility.
  51. // Ichitaro ver5 checks drive type by this structure size.
  52. } CDS_JPN; // see above
  53. typedef CDS_JPN UNALIGNED *PCDS_JPN;
  54. #define curdirLen_Jpn sizeof(CURDIR_LIST_JPN) // Needed for
  55. // ASM87 which doesn't allow
  56. // Size directive as a macro
  57. // argument
  58. // Flag values for CURDIR_FLAGS
  59. #define CURDIR_ISNET 0x8000
  60. #define CURDIR_ISIFS 0x8000
  61. #define CURDIR_INUSE 0x4000
  62. #define CURDIR_SPLICE 0x2000
  63. #define CURDIR_LOCAL 0x1000
  64. #define CURDIR_TOSYNC 0x0800 // Directory path to be sync added
  65. #define CURDIR_NT_FIX 0x0400 // fixed disk (includes NETWORK
  66. // drives. Used in $Current_dir perf
  67. // work.
  68. /* XLATOFF */
  69. typedef CDS UNALIGNED *PCDS;
  70. typedef CDS_JPN UNALIGNED *PCDS_JPN;
  71. /* XLATON */
  72. /* XLATOFF */
  73. #pragma pack()
  74. /* XLATON */