Source code of Windows XP (NT5)
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.

491 lines
13 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. NdsSntx.h
  5. Abstract:
  6. This module defines NDS Syntax IDs and Structures used in the NDS
  7. object API found in nds32.h.
  8. Author:
  9. Glenn Curtis [GlennC] 15-Dec-1995
  10. --*/
  11. #ifndef __NDSSNTX_H
  12. #define __NDSSNTX_H
  13. #define NDS_SYNTAX_ID_0 0 /* Unknown */
  14. #define NDS_SYNTAX_ID_1 1 /* Distinguished Name */
  15. #define NDS_SYNTAX_ID_2 2 /* Case Exact String */
  16. #define NDS_SYNTAX_ID_3 3 /* Case Ignore String */
  17. #define NDS_SYNTAX_ID_4 4 /* Printable String */
  18. #define NDS_SYNTAX_ID_5 5 /* Numeric String */
  19. #define NDS_SYNTAX_ID_6 6 /* Case Ignore List */
  20. #define NDS_SYNTAX_ID_7 7 /* Boolean */
  21. #define NDS_SYNTAX_ID_8 8 /* Integer */
  22. #define NDS_SYNTAX_ID_9 9 /* Octet String */
  23. #define NDS_SYNTAX_ID_10 10 /* Telephone Number */
  24. #define NDS_SYNTAX_ID_11 11 /* Facsimile Telephone Number */
  25. #define NDS_SYNTAX_ID_12 12 /* Net Address */
  26. #define NDS_SYNTAX_ID_13 13 /* Octet List */
  27. #define NDS_SYNTAX_ID_14 14 /* EMail Address */
  28. #define NDS_SYNTAX_ID_15 15 /* Path */
  29. #define NDS_SYNTAX_ID_16 16 /* Replica Pointer */
  30. #define NDS_SYNTAX_ID_17 17 /* Object ACL */
  31. #define NDS_SYNTAX_ID_18 18 /* Postal Address */
  32. #define NDS_SYNTAX_ID_19 19 /* Timestamp */
  33. #define NDS_SYNTAX_ID_20 20 /* Class Name */
  34. #define NDS_SYNTAX_ID_21 21 /* Stream */
  35. #define NDS_SYNTAX_ID_22 22 /* Counter */
  36. #define NDS_SYNTAX_ID_23 23 /* Back Link */
  37. #define NDS_SYNTAX_ID_24 24 /* Time */
  38. #define NDS_SYNTAX_ID_25 25 /* Typed Name */
  39. #define NDS_SYNTAX_ID_26 26 /* Hold */
  40. #define NDS_SYNTAX_ID_27 27 /* Interval */
  41. //
  42. // NDS Distinguished Name
  43. //
  44. // Used in attributes: Alias Object Name, Default Queue, Device,
  45. // Group Membership, Higher Privileges, Host Device,
  46. // Host Server, Member, Message Server, Operator, Owner,
  47. // Profile, Reference, Resource, Role Occupant,
  48. // Security Equals, See Also, Server, User, Volume
  49. //
  50. typedef struct
  51. {
  52. LPWSTR DNString;
  53. } ASN1_TYPE_1, * LPASN1_TYPE_1;
  54. //
  55. // NDS Case Exact String syntax
  56. //
  57. // Used in attribute: Home Directory
  58. //
  59. typedef struct
  60. {
  61. LPWSTR CaseExactString;
  62. } ASN1_TYPE_2, * LPASN1_TYPE_2;
  63. //
  64. // NDS Case Ignore String syntax
  65. //
  66. // Used in attributes: Cartridge, CN (Common Name), C (Country Name),
  67. // Description, Host Resource Name, L (Locality Name),
  68. // O (Organization Name), OU (Organizational Unit Name),
  69. // Physical Delivery Office Name, Postal Code,
  70. // Postal Office Box, Queue Directory, SAP Name,
  71. // S (State or Province Name), SA (Street Address),
  72. // Supported Services, Supported Typefaces, Surname,
  73. // Title, Unknown Base Class, Version
  74. //
  75. typedef struct
  76. {
  77. LPWSTR CaseIgnoreString;
  78. } ASN1_TYPE_3, * LPASN1_TYPE_3;
  79. //
  80. // NDS Printable String syntax
  81. //
  82. // Used in attributes: Page Description Language, Serial Number
  83. //
  84. typedef struct
  85. {
  86. LPWSTR PrintableString;
  87. } ASN1_TYPE_4, * LPASN1_TYPE_4;
  88. //
  89. // NDS Numeric String syntax
  90. //
  91. // Used in attributes: Bindery Type
  92. //
  93. typedef struct
  94. {
  95. LPWSTR NumericString;
  96. } ASN1_TYPE_5, * LPASN1_TYPE_5;
  97. //
  98. // NDS Case Ignore List syntax
  99. //
  100. // Used in attribute: Language
  101. //
  102. typedef struct _CI_LIST
  103. {
  104. struct _CI_LIST * Next;
  105. LPWSTR String;
  106. } ASN1_TYPE_6, * LPASN1_TYPE_6;
  107. //
  108. // NDS Boolean syntax
  109. //
  110. // Used in attributes: Allow Unlimited Credit, Detect Intruder,
  111. // Lockout After Detection, Locked By Intruder,
  112. // Login Diabled, Password Allow Change, Password Required,
  113. // Password Unique Required
  114. //
  115. typedef struct
  116. {
  117. DWORD Boolean;
  118. } ASN1_TYPE_7, * LPASN1_TYPE_7;
  119. //
  120. // Example: NDS Integer syntax
  121. //
  122. // Used in attributes: Bindery Object Restriction, Convergence, GID (Group ID),
  123. // Login Grace Limit, Login Intruder Limit,
  124. // Login Maximum Simultaneous, Memory,
  125. // Minimum Account Balance, Password Minimum Length, Status,
  126. // Supported Connections, UID (User ID)
  127. //
  128. typedef struct
  129. {
  130. DWORD Integer;
  131. } ASN1_TYPE_8, * LPASN1_TYPE_8;
  132. //
  133. // NDS Octet String syntax
  134. //
  135. // Used in attributes: Athority Revocation, Bindery Property, CA Private Key,
  136. // CA Public Key, Certificate Revocation,
  137. // Cross Certificate Pair, Login Allowed Time Map,
  138. // Passwords Used, Printer Configuration, Private Key,
  139. // Public Key
  140. //
  141. typedef struct
  142. {
  143. DWORD Length;
  144. LPBYTE OctetString;
  145. } ASN1_TYPE_9, * LPASN1_TYPE_9;
  146. //
  147. // NDS Telephone Number syntax
  148. //
  149. // Used in attribute: Telephone Number
  150. //
  151. typedef struct
  152. {
  153. LPWSTR TelephoneNumber;
  154. } ASN1_TYPE_10, * LPASN1_TYPE_10;
  155. //
  156. // NDS Facsimile Telephone Number syntax
  157. //
  158. // Used in attribute: Facsimile Telephone Number
  159. //
  160. typedef struct
  161. {
  162. LPWSTR TelephoneNumber;
  163. DWORD NumberOfBits;
  164. LPBYTE Parameters;
  165. } ASN1_TYPE_11, * LPASN1_TYPE_11;
  166. //
  167. // NDS Network Address syntax
  168. //
  169. // Used in attributes: Login Intruder Address, Network Address,
  170. // Network Address Restriction
  171. //
  172. typedef struct
  173. {
  174. DWORD AddressType; // 0 = IPX,
  175. DWORD AddressLength;
  176. BYTE * Address;
  177. } ASN1_TYPE_12, * LPASN1_TYPE_12;
  178. //
  179. // NDS Octet List syntax
  180. //
  181. // Used in attribute: (none)
  182. //
  183. typedef struct _OCTET_LIST
  184. {
  185. struct _OCTET_LIST * Next;
  186. DWORD Length;
  187. BYTE * Data;
  188. } ASN1_TYPE_13, * LPASN1_TYPE_13;
  189. //
  190. // NDS EMail Address syntax
  191. //
  192. // Used in attribute: EMail Address
  193. //
  194. typedef struct
  195. {
  196. DWORD Type;
  197. LPWSTR Address;
  198. } ASN1_TYPE_14, * LPASN1_TYPE_14;
  199. //
  200. // NDS Path syntax
  201. //
  202. // Used in attribute: Path
  203. //
  204. typedef struct
  205. {
  206. DWORD Type;
  207. LPWSTR VolumeName;
  208. LPWSTR Path;
  209. } ASN1_TYPE_15, * LPASN1_TYPE_15;
  210. //
  211. // NDS Replica Pointer syntax
  212. //
  213. // Used in attribute: Replica
  214. //
  215. typedef struct
  216. {
  217. LPWSTR ServerName;
  218. DWORD ReplicaType;
  219. DWORD ReplicaNumber;
  220. DWORD Count;
  221. ASN1_TYPE_12 ReplicaAddressHint[1]; // ReplicaAddressHint is variable and
  222. // can be calculated by Count * the
  223. // length of a ASN1_TYPE_12 ( that is
  224. // Count * 9).
  225. } ASN1_TYPE_16, * LPASN1_TYPE_16;
  226. //
  227. // NDS Object ACL syntax
  228. //
  229. // Used in attributes: ACL, Inherited ACL
  230. //
  231. typedef struct
  232. {
  233. LPWSTR ProtectedAttrName;
  234. LPWSTR SubjectName;
  235. DWORD Privileges;
  236. } ASN1_TYPE_17, * LPASN1_TYPE_17;
  237. //
  238. // NDS Postal Address syntax
  239. //
  240. // Used in attribute: Postal Address
  241. //
  242. typedef struct
  243. {
  244. LPWSTR PostalAddress[6]; // Value is limited to 6 lines,
  245. // 30 characters each.
  246. } ASN1_TYPE_18, * LPASN1_TYPE_18;
  247. //
  248. // NDS Timestamp syntax
  249. //
  250. // Used in attribute: Obituary, Partition Creation Time, Received Up To,
  251. // Syncronized Up To
  252. //
  253. typedef struct
  254. {
  255. DWORD WholeSeconds; // Zero equals 12:00 midnight, January 1, 1970, UTC
  256. DWORD EventID;
  257. } ASN1_TYPE_19, * LPASN1_TYPE_19;
  258. //
  259. // NDS Class Name syntax
  260. //
  261. // Used in attribute: Object Class
  262. //
  263. typedef struct
  264. {
  265. LPWSTR ClassName;
  266. } ASN1_TYPE_20, * LPASN1_TYPE_20;
  267. //
  268. // NDS Stream syntax
  269. //
  270. // Used in attribute: Login Script, Print Job Configuration, Printer Control,
  271. // Type Creator Map
  272. //
  273. typedef struct
  274. {
  275. DWORD Length; // Always zero
  276. BYTE * Data;
  277. } ASN1_TYPE_21, * LPASN1_TYPE_21;
  278. //
  279. // NDS Count syntax
  280. //
  281. // Used in attributes: Account Balance, Login Grace Remaining,
  282. // Login Intruder Attempts
  283. //
  284. typedef struct
  285. {
  286. DWORD Counter;
  287. } ASN1_TYPE_22, * LPASN1_TYPE_22;
  288. //
  289. // NDS Back Link syntax
  290. //
  291. // Used in attribute: Back Link
  292. //
  293. typedef struct
  294. {
  295. DWORD RemoteID;
  296. LPWSTR ObjectName;
  297. } ASN1_TYPE_23, * LPASN1_TYPE_23;
  298. //
  299. // NDS Time syntax
  300. //
  301. // Used in attributes: Last Login Time, Login Expiration Time,
  302. // Login Intruder Rest Time, Login Time,
  303. // Low Convergence Reset Time, Password Expiration Time
  304. //
  305. typedef struct
  306. {
  307. DWORD Time; // (in whole seconds) zero equals 12:00 midnight,
  308. // January 1, 1970, UTC
  309. } ASN1_TYPE_24, * LPASN1_TYPE_24;
  310. //
  311. // NDS Typed Name syntax
  312. //
  313. // Used in attribute: Notify, Print Server, Printer, Queue
  314. //
  315. typedef struct
  316. {
  317. LPWSTR ObjectName;
  318. DWORD Level;
  319. DWORD Interval;
  320. } ASN1_TYPE_25, * LPASN1_TYPE_25;
  321. //
  322. // NDS Hold syntax
  323. //
  324. // Used in attribute: Server Holds
  325. //
  326. typedef struct
  327. {
  328. LPWSTR ObjectName;
  329. DWORD Amount;
  330. } ASN1_TYPE_26, * LPASN1_TYPE_26;
  331. //
  332. // NDS Interval syntax
  333. //
  334. // Used in attribute: High Convergence Syncronization Interval,
  335. // Intruder Attempt Reset Interval,
  336. // Intruder Lockout Reset Interval,
  337. // Low Convergence Syncronization Interval,
  338. // Password Expiration Interval
  339. //
  340. typedef struct
  341. {
  342. DWORD Interval;
  343. } ASN1_TYPE_27, * LPASN1_TYPE_27;
  344. //
  345. // rc.exe falls over because this macro gets way too long
  346. //
  347. #ifndef RC_INVOKED
  348. #define SIZE_OF_ASN1_1 sizeof( ASN1_TYPE_1 )
  349. #define SIZE_OF_ASN1_2 sizeof( ASN1_TYPE_2 )
  350. #define SIZE_OF_ASN1_3 sizeof( ASN1_TYPE_3 )
  351. #define SIZE_OF_ASN1_4 sizeof( ASN1_TYPE_4 )
  352. #define SIZE_OF_ASN1_5 sizeof( ASN1_TYPE_5 )
  353. #define SIZE_OF_ASN1_6 sizeof( ASN1_TYPE_6 )
  354. #define SIZE_OF_ASN1_7 sizeof( ASN1_TYPE_7 )
  355. #define SIZE_OF_ASN1_8 sizeof( ASN1_TYPE_8 )
  356. #define SIZE_OF_ASN1_9 sizeof( ASN1_TYPE_9 )
  357. #define SIZE_OF_ASN1_10 sizeof( ASN1_TYPE_10 )
  358. #define SIZE_OF_ASN1_11 sizeof( ASN1_TYPE_11 )
  359. #define SIZE_OF_ASN1_12 sizeof( ASN1_TYPE_12 )
  360. #define SIZE_OF_ASN1_13 sizeof( ASN1_TYPE_13 )
  361. #define SIZE_OF_ASN1_14 sizeof( ASN1_TYPE_14 )
  362. #define SIZE_OF_ASN1_15 sizeof( ASN1_TYPE_15 )
  363. #define SIZE_OF_ASN1_16 sizeof( ASN1_TYPE_16 )
  364. #define SIZE_OF_ASN1_17 sizeof( ASN1_TYPE_17 )
  365. #define SIZE_OF_ASN1_18 sizeof( ASN1_TYPE_18 )
  366. #define SIZE_OF_ASN1_19 sizeof( ASN1_TYPE_19 )
  367. #define SIZE_OF_ASN1_20 sizeof( ASN1_TYPE_20 )
  368. #define SIZE_OF_ASN1_21 sizeof( ASN1_TYPE_21 )
  369. #define SIZE_OF_ASN1_22 sizeof( ASN1_TYPE_22 )
  370. #define SIZE_OF_ASN1_23 sizeof( ASN1_TYPE_23 )
  371. #define SIZE_OF_ASN1_24 sizeof( ASN1_TYPE_24 )
  372. #define SIZE_OF_ASN1_25 sizeof( ASN1_TYPE_25 )
  373. #define SIZE_OF_ASN1_26 sizeof( ASN1_TYPE_26 )
  374. #define SIZE_OF_ASN1_27 sizeof( ASN1_TYPE_27 )
  375. #define MOD_OF_ASN1_1 (SIZE_OF_ASN1_1 % sizeof(DWORD))
  376. #define MOD_OF_ASN1_2 (SIZE_OF_ASN1_2 % sizeof(DWORD))
  377. #define MOD_OF_ASN1_3 (SIZE_OF_ASN1_3 % sizeof(DWORD))
  378. #define MOD_OF_ASN1_4 (SIZE_OF_ASN1_4 % sizeof(DWORD))
  379. #define MOD_OF_ASN1_5 (SIZE_OF_ASN1_5 % sizeof(DWORD))
  380. #define MOD_OF_ASN1_6 (SIZE_OF_ASN1_6 % sizeof(DWORD))
  381. #define MOD_OF_ASN1_7 (SIZE_OF_ASN1_7 % sizeof(DWORD))
  382. #define MOD_OF_ASN1_8 (SIZE_OF_ASN1_8 % sizeof(DWORD))
  383. #define MOD_OF_ASN1_9 (SIZE_OF_ASN1_9 % sizeof(DWORD))
  384. #define MOD_OF_ASN1_10 (SIZE_OF_ASN1_10 % sizeof(DWORD))
  385. #define MOD_OF_ASN1_11 (SIZE_OF_ASN1_11 % sizeof(DWORD))
  386. #define MOD_OF_ASN1_12 (SIZE_OF_ASN1_12 % sizeof(DWORD))
  387. #define MOD_OF_ASN1_13 (SIZE_OF_ASN1_13 % sizeof(DWORD))
  388. #define MOD_OF_ASN1_14 (SIZE_OF_ASN1_14 % sizeof(DWORD))
  389. #define MOD_OF_ASN1_15 (SIZE_OF_ASN1_15 % sizeof(DWORD))
  390. #define MOD_OF_ASN1_16 (SIZE_OF_ASN1_16 % sizeof(DWORD))
  391. #define MOD_OF_ASN1_17 (SIZE_OF_ASN1_17 % sizeof(DWORD))
  392. #define MOD_OF_ASN1_18 (SIZE_OF_ASN1_18 % sizeof(DWORD))
  393. #define MOD_OF_ASN1_19 (SIZE_OF_ASN1_19 % sizeof(DWORD))
  394. #define MOD_OF_ASN1_20 (SIZE_OF_ASN1_20 % sizeof(DWORD))
  395. #define MOD_OF_ASN1_21 (SIZE_OF_ASN1_21 % sizeof(DWORD))
  396. #define MOD_OF_ASN1_22 (SIZE_OF_ASN1_22 % sizeof(DWORD))
  397. #define MOD_OF_ASN1_23 (SIZE_OF_ASN1_23 % sizeof(DWORD))
  398. #define MOD_OF_ASN1_24 (SIZE_OF_ASN1_24 % sizeof(DWORD))
  399. #define MOD_OF_ASN1_25 (SIZE_OF_ASN1_25 % sizeof(DWORD))
  400. #define MOD_OF_ASN1_26 (SIZE_OF_ASN1_26 % sizeof(DWORD))
  401. #define MOD_OF_ASN1_27 (SIZE_OF_ASN1_27 % sizeof(DWORD))
  402. #define SUM_OF_ASN1_MODS ( MOD_OF_ASN1_1 + MOD_OF_ASN1_2 + MOD_OF_ASN1_3 + \
  403. MOD_OF_ASN1_4 + MOD_OF_ASN1_5 + MOD_OF_ASN1_6 + \
  404. MOD_OF_ASN1_7 + MOD_OF_ASN1_8 + MOD_OF_ASN1_9 + \
  405. MOD_OF_ASN1_10 + MOD_OF_ASN1_11 + MOD_OF_ASN1_12 + \
  406. MOD_OF_ASN1_13 + MOD_OF_ASN1_14 + MOD_OF_ASN1_15 + \
  407. MOD_OF_ASN1_16 + MOD_OF_ASN1_17 + MOD_OF_ASN1_18 + \
  408. MOD_OF_ASN1_19 + MOD_OF_ASN1_20 + MOD_OF_ASN1_21 + \
  409. MOD_OF_ASN1_22 + MOD_OF_ASN1_23 + MOD_OF_ASN1_24 + \
  410. MOD_OF_ASN1_25 + MOD_OF_ASN1_26 + MOD_OF_ASN1_27 )
  411. //
  412. // If an error occurs here, then the structures found in this file are not
  413. // DWORD aligned. They should be in order to run on RISC platforms.
  414. //
  415. static int x[1 - SUM_OF_ASN1_MODS] ;
  416. #endif // RC_INVOKED
  417. #endif