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.

115 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. udfs_rec.h
  5. Abstract:
  6. This module contains the mini-file system recognizer for UDFS.
  7. Author:
  8. Dan Lovinger (danlo) 13-Feb-1997
  9. Environment:
  10. Kernel mode, local to I/O system
  11. Revision History:
  12. --*/
  13. //
  14. // NOTE CAREFULLY: the canonical location for this information is in the UDFS
  15. // driver source.
  16. //
  17. //
  18. // Aligning this byte offset to a sector boundary by rounding up will
  19. // yield the starting offset of the Volume Recognition Area (2/8.3)
  20. //
  21. #define VRA_BOUNDARY_LOCATION (32767 + 1)
  22. /*** ISO 13346 Part 2: Volume and Boot Block Recognition
  23. *
  24. *
  25. */
  26. /*** vsd_generic - Generic Volume Structure Descriptor (2/9.1)
  27. *
  28. */
  29. typedef struct VSD_GENERIC {
  30. UCHAR Type; // Structure Type
  31. UCHAR Ident[5]; // Standard Identifier
  32. UCHAR Version; // Standard Version
  33. UCHAR Data[2041]; // Structure Data
  34. } VSD_GENERIC, *PVSD_GENERIC;
  35. // VSD_LENGTH_... - vsd field lengths
  36. #define VSD_LENGTH_IDENT 5 // Length of regid_Identifier (bytes)
  37. // VSD_IDENT_... - Values for vsd_generic_Ident
  38. #define VSD_IDENT_BEA01 "BEA01" // Begin Extended Area
  39. #define VSD_IDENT_TEA01 "TEA01" // Terminate Extended Area
  40. #define VSD_IDENT_CDROM "CDROM" // High Sierra Group (pre-ISO 9660)
  41. #define VSD_IDENT_CD001 "CD001" // ISO 9660
  42. #define VSD_IDENT_CDW01 "CDW01" // ECMA 168
  43. #define VSD_IDENT_CDW02 "CDW02" // ISO 13490
  44. #define VSD_IDENT_NSR01 "NSR01" // ECMA 167
  45. #define VSD_IDENT_NSR02 "NSR02" // ISO 13346
  46. #define VSD_IDENT_BOOT2 "BOOT2" // Boot Descriptor
  47. #define VSD_IDENT_NSR03 "NSR03" // ECMA 167 3rd Edition
  48. typedef enum _VSD_IDENT {
  49. VsdIdentBad = 0,
  50. VsdIdentBEA01,
  51. VsdIdentTEA01,
  52. VsdIdentCDROM,
  53. VsdIdentCD001,
  54. VsdIdentCDW01,
  55. VsdIdentCDW02,
  56. VsdIdentNSR01,
  57. VsdIdentNSR02,
  58. VsdIdentBOOT2,
  59. VsdIdentNSR03
  60. } VSD_IDENT, *PVSD_IDENT;
  61. //
  62. // Following structure is used to build up static data for parse tables
  63. //
  64. typedef struct _PARSE_KEYVALUE {
  65. PCHAR Key;
  66. ULONG Value;
  67. } PARSE_KEYVALUE, *PPARSE_KEYVALUE;
  68. //
  69. // Define the functions provided by this driver.
  70. //
  71. BOOLEAN
  72. IsUdfsVolume (
  73. IN PDEVICE_OBJECT DeviceObject,
  74. IN ULONG SectorSize
  75. );
  76. ULONG
  77. UdfsFindInParseTable (
  78. IN PPARSE_KEYVALUE ParseTable,
  79. IN PCHAR Id,
  80. IN ULONG MaxIdLen
  81. );
  82. #define SectorAlignN(SECTORSIZE, L) ( \
  83. ((((ULONG)(L)) + ((SECTORSIZE) - 1)) & ~((SECTORSIZE) - 1)) \
  84. )