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.

187 lines
4.5 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. protocol.h
  5. Abstract:
  6. This file defines the protocol specific constants for NT Lanman
  7. Author:
  8. Larry Osterman (larryo) 5-Apr-1991
  9. Revision History:
  10. 5-Apr-1991 LarryO
  11. Created from LANMAN 1.2 protocol header.
  12. --*/
  13. #ifndef _PROTOCOL_
  14. #define _PROCOTOL_
  15. //
  16. //
  17. // Define protocol names
  18. //
  19. //
  20. //
  21. // PCNET1 is the original SMB protocol (CORE).
  22. //
  23. #define PCNET1 "PC NETWORK PROGRAM 1.0"
  24. //
  25. // Some versions of the original MSNET defined this as an alternate
  26. // to the core protocol name
  27. //
  28. #define PCLAN1 "PCLAN1.0"
  29. //
  30. // This is used for the MS-NET 1.03 product. It defines Lock&Read,
  31. // Write&Unlock, and a special version of raw read and raw write.
  32. //
  33. #define MSNET103 "MICROSOFT NETWORKS 1.03"
  34. //
  35. // This is the DOS Lanman 1.0 specific protocol. It is equivilant
  36. // to the LANMAN 1.0 protocol, except the server is required to
  37. // map errors from the OS/2 error to an appropriate DOS error.
  38. //
  39. #define MSNET30 "MICROSOFT NETWORKS 3.0"
  40. //
  41. // This is the first version of the full LANMAN 1.0 protocol, defined in
  42. // the SMB FILE SHARING PROTOCOL EXTENSIONS VERSION 2.0 document.
  43. //
  44. #define LANMAN10 "LANMAN1.0"
  45. //
  46. // This is the first version of the full LANMAN 2.0 protocol, defined in
  47. // the SMB FILE SHARING PROTOCOL EXTENSIONS VERSION 3.0 document. Note
  48. // that the name is an interim protocol definition. This is for
  49. // interoperability with IBM LAN SERVER 1.2
  50. //
  51. #define LANMAN12 "LM1.2X002"
  52. //
  53. // This is the dos equivilant of the LANMAN12 protocol. It is identical
  54. // to the LANMAN12 protocol, but the server will perform error mapping
  55. // to appropriate DOS errors.
  56. //
  57. #define DOSLANMAN12 "DOS LM1.2X002" /* DOS equivalant of above. Final
  58. * string will be "DOS LANMAN2.0" */
  59. //
  60. // Strings for LANMAN 2.1.
  61. //
  62. #define LANMAN21 "LANMAN2.1"
  63. #define DOSLANMAN21 "DOS LANMAN2.1"
  64. //
  65. // !!! Do not set to final protcol string until the spec
  66. // is cast in stone.
  67. //
  68. // The SMB protocol designed for NT. This has special SMBs
  69. // which duplicate the NT semantics.
  70. //
  71. #define NTLANMAN "NT LM 0.12"
  72. #ifdef INCLUDE_SMB_IFMODIFIED
  73. //
  74. // The SMB protocol designed for NT for SMBs post Win2000.
  75. //
  76. #define NTLANMAN2 "NT LM 0.13"
  77. #endif
  78. //
  79. // The Cairo dialect
  80. //
  81. //
  82. #define CAIROX "Cairo 0.xa"
  83. //
  84. // The XENIXCORE dialect is a bit special. It is identical to core,
  85. // except user passwords are not to be uppercased before being shipped
  86. // to the server
  87. //
  88. #define XENIXCORE "XENIX CORE"
  89. //
  90. // Windows for Workgroups V1.0
  91. //
  92. #define WFW10 "Windows for Workgroups 3.1a"
  93. #define PCNET1_SZ 22
  94. #define PCLAN1_SZ 8
  95. #define MSNET103_SZ 23
  96. #define MSNET30_SZ 22
  97. #define LANMAN10_SZ 9
  98. #define LANMAN12_SZ 9
  99. #define DOSLANMAN12_SZ 13
  100. /*
  101. * Defines and data for Negotiate Protocol
  102. */
  103. #define PC1 0
  104. #define PC2 1
  105. #define LM1 2
  106. #define MS30 3
  107. #define MS103 4
  108. #define LM12 5
  109. #define DOSLM12 6
  110. /* Protocol indexes definition. */
  111. #define PCLAN 1 /* PC Lan 1.0 & MS Lan 1.03 */
  112. #define MSNT30 2 /* MS Net 3.0 redirector */
  113. #define DOSLM20 3 /* Dos LAN Manager 2.0 */
  114. #define LANMAN 4 /* Lanman redirector */
  115. #define LANMAN20 5 /* Lan Manager 2.0 */
  116. //
  117. // Protocol specific path constraints.
  118. //
  119. #define MAXIMUM_PATHLEN_LANMAN12 260
  120. #define MAXIMUM_PATHLEN_CORE 128
  121. #define MAXIMUM_COMPONENT_LANMAN12 254
  122. #define MAXIMUM_COMPONENT_CORE 8+1+3 // 8.3 filenames.
  123. /*NOINC*/
  124. /* CLTYPE_BASE should specify the name the first string in the file
  125. apperr2.h. NUM_CLTYPES should be equal to the index of the last
  126. protocol just as is the case with the above definitions. Also,
  127. this part should be ifdef'd so that only the files that also include
  128. the apperr2.h header will have it defined. */
  129. #ifdef APE2_CLIENT_DOWNLEVEL
  130. #define CLTYPE_BASE APE2_CLIENT_DOWNLEVEL
  131. #define NUM_CLTYPES LANMAN20
  132. #endif
  133. #endif // _PROTOCOL_