home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / os232.exe / INCLUDE / NWDSDEFS.H < prev    next >
Text File  |  1995-05-10  |  13KB  |  308 lines

  1. /******************************************************************************
  2.  
  3.   $Workfile:   nwdsdefs.h  $
  4.   $Revision:   1.14  $
  5.   $Modtime::   09 May 1995 15:06:12                        $
  6.   $Copyright:
  7.  
  8.   Copyright (c) 1989-1995 Novell, Inc.  All Rights Reserved.                      
  9.  
  10.   THIS WORK IS  SUBJECT  TO  U.S.  AND  INTERNATIONAL  COPYRIGHT  LAWS  AND
  11.   TREATIES.   NO  PART  OF  THIS  WORK MAY BE  USED,  PRACTICED,  PERFORMED
  12.   COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED,  ABRIDGED, CONDENSED,
  13.   EXPANDED,  COLLECTED,  COMPILED,  LINKED,  RECAST, TRANSFORMED OR ADAPTED
  14.   WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
  15.   OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
  16.   CRIMINAL AND CIVIL LIABILITY.$
  17.  
  18.  *****************************************************************************/
  19. #if ! defined ( NWDSDEFS_H )
  20. #define NWDSDEFS_H
  21.  
  22. /* * Directory Services NCP verb and subverbs * */
  23. #define DS_NCP_VERB                104
  24.  
  25. /* subverbs */
  26. #define DS_NCP_PING                  1
  27. #define DS_NCP_FRAGMENT              2
  28. #define DS_NCP_FRAGMENT_CLOSE        3
  29. #define DS_NCP_BINDERY_CONTEXT       4
  30. #define DS_NCP_MONITOR_CONNECTION    5
  31. #define DS_NCP_GET_DS_STATISTICS     6
  32. #define DS_NCP_RESET_DS_COUNTERS     7
  33. #define DS_NCP_RELOAD                8
  34. #define DS_NCP_AUDITING            200  /* 200 - 255 reserved for auditing */
  35.  
  36. /* * Directory Services Large Packet Verb Numbers *  */
  37. #define DSV_UNUSED_0                  0      /* 0x00 */
  38. #define DSV_RESOLVE_NAME              1      /* 0x01 */
  39. #define DSV_READ_ENTRY_INFO           2      /* 0x02 */
  40. #define DSV_READ                      3      /* 0x03 */
  41. #define DSV_COMPARE                   4      /* 0x04 */
  42. #define DSV_LIST                      5      /* 0x05 */
  43. #define DSV_SEARCH                    6      /* 0x06 */
  44. #define DSV_ADD_ENTRY                 7      /* 0x07 */
  45. #define DSV_REMOVE_ENTRY              8      /* 0x08 */
  46. #define DSV_MODIFY_ENTRY              9      /* 0x09 */
  47. #define DSV_MODIFY_RDN               10      /* 0x0A */
  48. #define DSV_DEFINE_ATTR              11      /* 0x0B */
  49. #define DSV_READ_ATTR_DEF            12      /* 0x0C */
  50. #define DSV_REMOVE_ATTR_DEF          13      /* 0x0D */
  51. #define DSV_DEFINE_CLASS             14      /* 0x0E */
  52. #define DSV_READ_CLASS_DEF           15      /* 0x0F */
  53. #define DSV_MODIFY_CLASS_DEF         16      /* 0x10 */
  54. #define DSV_REMOVE_CLASS_DEF         17      /* 0x11 */
  55. #define DSV_LIST_CONTAINABLE_CLASSES 18      /* 0x12 */
  56. #define DSV_GET_EFFECTIVE_RIGHTS     19      /* 0x13 */
  57. #define DSV_ADD_PARTITION            20      /* 0x14 */
  58. #define DSV_REMOVE_PARTITION         21      /* 0x15 */
  59. #define DSV_LIST_PARTITIONS          22      /* 0x16 */
  60. #define DSV_SPLIT_PARTITION          23      /* 0x17 */
  61. #define DSV_JOIN_PARTITIONS          24      /* 0x18 */
  62. #define DSV_ADD_REPLICA              25      /* 0x19 */
  63. #define DSV_REMOVE_REPLICA           26      /* 0x1A */
  64. #define DSV_OPEN_STREAM              27      /* 0x1B */
  65. #define DSV_SEARCH_FILTER            28      /* 0x1C */
  66.  
  67. #define DSV_CHANGE_REPLICA_TYPE      31      /* 0x1F */
  68.  
  69. #define DSV_SYNC_PARTITION           38      /* 0x26 */
  70. #define DSV_SYNC_SCHEMA              39      /* 0x27 */
  71. #define DSV_READ_SYNTAXES            40      /* 0x28 */
  72. #define DSV_GET_REPLICA_ROOT_ID      41      /* 0x29 */
  73. #define DSV_BEGIN_MOVE_ENTRY         42      /* 0x2A */
  74. #define DSV_FINISH_MOVE_ENTRY        43      /* 0x2B */
  75. #define DSV_RELEASE_MOVED_ENTRY      44      /* 0x2C */
  76. #define DSV_BACKUP_ENTRY             45      /* 0x2D */
  77. #define DSV_RESTORE_ENTRY            46      /* 0x2E */
  78.                                      
  79. #define DSV_CLOSE_ITERATION          50      /* 0x32 */
  80.  
  81. #define DSV_GET_SERVER_ADDRESS       53      /* 0x35 */
  82. #define DSV_SET_KEYS                 54      /* 0x36 */
  83. #define DSV_CHANGE_PASSWORD          55      /* 0x37 */
  84. #define DSV_VERIFY_PASSWORD          56      /* 0x38 */
  85. #define DSV_BEGIN_LOGIN              57      /* 0x39 */
  86. #define DSV_FINISH_LOGIN             58      /* 0x3A */
  87. #define DSV_BEGIN_AUTHENTICATION     59      /* 0x3B */
  88. #define DSV_FINISH_AUTHENTICATION    60      /* 0x3C */
  89. #define DSV_LOGOUT                   61      /* 0x3D */
  90. #define DSV_REPAIR_RING              62      /* 0x3E */
  91. #define DSV_REPAIR_TIMESTAMPS        63      /* 0x3F */
  92.  
  93. #define DSV_DESIGNATE_NEW_MASTER     69      /* 0x45 */
  94.  
  95. #define DSV_CHECK_LOGIN_RESTRICTIONS 72      /* 0x48 */
  96.  
  97. #define DSV_ABORT_PARTITION_OPERATION 76     /* 0x4C */
  98.  
  99. #define DSV_READ_REFERENCES           79     /* 0x4F */
  100. #define DSV_INSPECT_ENTRY             80     /* 0x50 */
  101.  
  102. /* maximum number of characters in names, not including terminator */
  103. #define MAX_RDN_CHARS           128
  104. #define MAX_DN_CHARS            256
  105. #define MAX_SCHEMA_NAME_CHARS    32
  106. #define MAX_TREE_NAME_CHARS      32
  107. #define MAX_SAP_NAME_CHARS       47
  108.  
  109. /* maximum size of names, including terminator */
  110. #define MAX_RDN_BYTES           (2*(MAX_RDN_CHARS + 1))
  111. #define MAX_DN_BYTES            (2*(MAX_DN_CHARS + 1))
  112. #define MAX_SCHEMA_NAME_BYTES   (2*(MAX_SCHEMA_NAME_CHARS + 1))
  113.  
  114. #define MAX_ASN1_NAME           32
  115. #define MAX_VALUE               (63U * 1024U)
  116. #define MAX_MESSAGE             0x00010000L
  117. #define NO_MORE_ITERATIONS      0xffffffffL
  118.  
  119. /* delimiters in names */
  120. #define DELIM_VALUE             '='
  121. #define DELIM_DV                '+'
  122. #define DELIM_RDN               '.'
  123. #define ESCAPE_CHAR             '\\'
  124.  
  125. /* special entry names in ACLs */
  126. #define DS_ROOT_NAME            "[Root]"
  127. #define DS_PUBLIC_NAME          "[Public]"
  128. #define DS_MASK_NAME            "[Inheritance Mask]"
  129. #define DS_CREATOR_NAME         "[Creator]"  /* can only be used in AddEntry */
  130. #define DS_SELF_NAME            "[Self]"     /* can only be used in AddEntry */
  131.  
  132. /* special attribute names in ACLs */
  133. #define DS_ALL_ATTRS_NAME       "[All Attributes Rights]"
  134. #define DS_SMS_RIGHTS_NAME      "[SMS Rights]"
  135. #define DS_ENTRY_RIGHTS_NAME    "[Entry Rights]"
  136.  
  137. typedef enum SYNTAX
  138. {
  139.    SYN_UNKNOWN,                /* 0  */
  140.    SYN_DIST_NAME,              /* 1  */
  141.    SYN_CE_STRING,              /* 2  */
  142.    SYN_CI_STRING,              /* 3  */
  143.    SYN_PR_STRING,              /* 4  */
  144.    SYN_NU_STRING,              /* 5  */
  145.    SYN_CI_LIST,                /* 6  */
  146.    SYN_BOOLEAN,                /* 7  */
  147.    SYN_INTEGER,                /* 8  */
  148.    SYN_OCTET_STRING,           /* 9  */
  149.    SYN_TEL_NUMBER,             /* 10 */
  150.    SYN_FAX_NUMBER,             /* 11 */
  151.    SYN_NET_ADDRESS,            /* 12 */
  152.    SYN_OCTET_LIST,             /* 13 */
  153.    SYN_EMAIL_ADDRESS,          /* 14 */
  154.    SYN_PATH,                   /* 15 */
  155.    SYN_REPLICA_POINTER,        /* 16 */
  156.    SYN_OBJECT_ACL,             /* 17 */
  157.    SYN_PO_ADDRESS,             /* 18 */
  158.    SYN_TIMESTAMP,              /* 19 */
  159.    SYN_CLASS_NAME,             /* 20 */
  160.    SYN_STREAM,                 /* 21 */
  161.    SYN_COUNTER,                /* 22 */
  162.    SYN_BACK_LINK,              /* 23 */
  163.    SYN_TIME,                   /* 24 */
  164.    SYN_TYPED_NAME,             /* 25 */
  165.    SYN_HOLD,                   /* 26 */
  166.    SYN_INTERVAL,               /* 27 */
  167.    SYNTAX_COUNT                /* 28 */
  168. } SYNTAX;
  169.  
  170. typedef enum NAME_SPACE_TYPE
  171. {
  172.    DS_DOS, DS_MACINTOSH, DS_UNIX, DS_FTAM, DS_OS2
  173. } NAME_SPACE_TYPE;
  174.  
  175. typedef enum REPLICA_TYPE 
  176. {
  177.    RT_MASTER, RT_SECONDARY, RT_READONLY, RT_SUBREF, RT_COUNT
  178. } REPLICA_TYPE;
  179.  
  180. typedef enum REPLICA_STATE
  181. {
  182.    RS_ON, RS_NEW_REPLICA, RS_DYING_REPLICA,
  183.    RS_LOCKED, RS_CRT_0, RS_CRT_1,
  184.    RS_TRANSITION_ON, RS_TRANSITION_MOVE, RS_TRANSITION_SPLIT,
  185.    RS_SS_0 = 48, RS_SS_1,
  186.    RS_JS_0 = 64, RS_JS_1, RS_JS_2,
  187.    RS_MS_0 = 80, RS_MS_1, RS_MS_2,
  188.    RS_COUNT
  189. } REPLICA_STATE;
  190.  
  191. #define GET_REPLICA_TYPE(rpt)    ((rpt) & 0x0000FFFF)
  192. #define GET_REPLICA_STATE(rpt)   ((rpt) >> 16)
  193.  
  194. typedef enum NET_ADDRESS_TYPE 
  195. {
  196.   NT_IPX, NT_IP, NT_SDLC, NT_TOKENRING_ETHERNET, NT_OSI, NT_APPLETALK, NT_COUNT
  197. } NET_ADDRESS_TYPE;
  198.  
  199. typedef enum NCP_SERVER_STATUS
  200. {
  201.    DS_UNKNOWN, DS_DOWN, DS_UP
  202. } NCP_SERVER_STATUS;
  203.  
  204. #define IPX_ADDRESS_LEN   12
  205.  
  206. /*Entry flag definitions used by DSV_LIST, DSV_READ_ENTRY_INFO, DSV_SEARCH. */
  207. #define DS_ALIAS_ENTRY         0x0001
  208. #define DS_PARTITION_ROOT      0x0002
  209. #define DS_CONTAINER_ENTRY     0x0004
  210. #define DS_CONTAINER_ALIAS     0x0008
  211. #define DS_MATCHES_LIST_FILTER 0x0010   /* only returned by DSV_LIST */
  212.  
  213. /* * definitions used by DSV_MODIFY_ENTRY * */
  214. #define DS_ADD_ATTRIBUTE       0x00 /* add first value of attribute, error if it already exists */
  215. #define DS_REMOVE_ATTRIBUTE    0x01 /* remove all values, error if attribute does not exist */
  216. #define DS_ADD_VALUE           0x02 /* add first or additional value, error if duplicate */
  217. #define DS_REMOVE_VALUE        0x03 /* remove a value, error if it does not exist */
  218. #define DS_ADDITIONAL_VALUE    0x04 /* add additional value, error if duplicate or first */
  219. #define DS_OVERWRITE_VALUE     0x05 /* add first or additional value, overwrite if duplicate */
  220. #define DS_CLEAR_ATTRIBUTE     0x06 /* remove all values, no error if attribute does not exists */
  221. #define DS_CLEAR_VALUE         0x07 /* remove value, no error if value does not exists */
  222.  
  223. /* * definitions used by DSV_READ, DSV_SEARCH * */
  224. #define DS_ATTRIBUTE_NAMES      0x00
  225. #define DS_ATTRIBUTE_VALUES     0x01
  226. #define DS_EFFECTIVE_PRIVILEGES 0x02
  227. #define DS_VALUE_INFO           0x03
  228. #define DS_ABBREVIATED_VALUE    0x04
  229.  
  230. /* * definitions used by DSV_READ for value flags * */
  231. #define DS_NAMING               0x0001
  232. #define DS_BASECLASS            0x0002
  233. #define DS_PRESENT              0x0004
  234.  
  235. /* * definitions used by DSV_READ_ATTR_DEF * */
  236. #define DS_SINGLE_VALUED_ATTR   0x0001   /* also used by DSV_DEFINE_ATTR */
  237. #define DS_SIZED_ATTR           0x0002   /* also used by DSV_DEFINE_ATTR */
  238. #define DS_NONREMOVABLE_ATTR    0x0004
  239. #define DS_READ_ONLY_ATTR       0x0008
  240. #define DS_HIDDEN_ATTR          0x0010
  241. #define DS_STRING_ATTR          0x0020
  242. #define DS_SYNC_IMMEDIATE       0x0040   /* also used by DSV_DEFINE_ATTR */
  243. #define DS_PUBLIC_READ          0x0080   /* also used by DSV_DEFINE_ATTR */
  244. #define DS_SERVER_READ          0x0100
  245. #define DS_WRITE_MANAGED        0x0200   /* also used by DSV_DEFINE_ATTR */
  246. #define DS_PER_REPLICA          0x0400   /* also used by DSV_DEFINE_ATTR */
  247. #define DS_ATTR_DEF_NAMES       0
  248. #define DS_ATTR_DEFS            1
  249.  
  250. /* * definitions used by DSV_DEFINE_CLASS and DSV_READ_CLASS_DEF * */
  251. #define DS_CONTAINER_CLASS       0x01
  252. #define DS_EFFECTIVE_CLASS       0x02
  253. #define DS_NONREMOVABLE_CLASS    0x04
  254. #define DS_AMBIGUOUS_NAMING      0x08
  255. #define DS_AMBIGUOUS_CONTAINMENT 0x10
  256. #define DS_CLASS_DEF_NAMES       0
  257. #define DS_CLASS_DEFS            1
  258. #define DS_EXPANDED_CLASS_DEFS   2
  259. #define DS_INFO_CLASS_DEFS       3
  260. #define DS_FULL_CLASS_DEFS       4
  261.  
  262. /* * definitions used by DSV_SEARCH * */
  263. #define DS_SEARCH_ENTRY             0
  264. #define DS_SEARCH_SUBORDINATES      1
  265. #define DS_SEARCH_SUBTREE           2
  266. #define DS_ALIAS_REFERRAL           0
  267. #define DS_PARTITION_REFERRAL       1
  268. #define DS_SEARCH_ITEM              0
  269. #define DS_SEARCH_OR                1
  270. #define DS_SEARCH_AND               2
  271. #define DS_SEARCH_NOT               3
  272.                                   
  273. #define DS_SEARCH_EQUAL             7
  274. #define DS_SEARCH_GREATER_OR_EQUAL  8
  275. #define DS_SEARCH_LESS_OR_EQUAL     9
  276. #define DS_SEARCH_APPROX           10
  277. #define DS_SEARCH_PRESENT          15
  278. #define DS_SEARCH_RDN              16
  279. #define DS_SEARCH_BASE_CLASS       17
  280. #define DS_SEARCH_MODIFICATION_GE  18
  281. #define DS_SEARCH_VALUE_TIME_GE    19
  282. #define DS_SEARCH_REFERENCES       20
  283.  
  284. /* * definitions used by Access Control * */
  285. #define DS_ENTRY_BROWSE         0x00000001L
  286. #define DS_ENTRY_ADD            0x00000002L
  287. #define DS_ENTRY_DELETE         0x00000004L
  288. #define DS_ENTRY_RENAME         0x00000008L
  289. #define DS_ENTRY_SUPERVISOR     0x00000010L
  290.  
  291. #define DS_ENTRY_MASK         (DS_ENTRY_BROWSE | DS_ENTRY_ADD \
  292.                               | DS_ENTRY_DELETE | DS_ENTRY_RENAME \
  293.                               | DS_ENTRY_SUPERVISOR)
  294.  
  295. #define DS_ATTR_COMPARE         0x00000001L
  296. #define DS_ATTR_READ            0x00000002L
  297. #define DS_ATTR_WRITE           0x00000004L
  298. #define DS_ATTR_SELF            0x00000008L
  299. #define DS_ATTR_SUPERVISOR      0x00000020L
  300.  
  301. #define DS_ATTR_MASK            (DS_ATTR_COMPARE | DS_ATTR_READ | DS_ATTR_WRITE \
  302.                               | DS_ATTR_SELF | DS_ATTR_SUPERVISOR)
  303.  
  304. #define DS_READ_STREAM          0x00000001L
  305. #define DS_WRITE_STREAM         0x00000002L
  306.  
  307. #endif /* NWDSDEFS_H */
  308.