Files
mars-nwe/include/nwnss/support/ndssdkINC_kern/dconst.h

265 lines
8.4 KiB
C

/*****************************************************************************
*
* (C) Copyright 2004 Novell, Inc.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, contact Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com
*
* Name: dconst.h
* %version: 13 %
* %created_by: bjarvis %
* %date_modified: Tue Nov 10 16:09:39 1998 %
*
****************************************************************************/
#ifndef DCONST_H
#define DCONST_H
/* maximum number of characters in names, not including terminator */
#define MAX_RDN_CHARS 128
#define MAX_DN_CHARS 256
#define MAX_SCHEMA_NAME_CHARS 32
#define MAX_TREE_NAME_CHARS 32
#define MAX_SAP_NAME_CHARS 47
#define MAX_OS_NAME_CHARS 32
#define MAX_VENDOR_NAME_CHARS 32
#define MAX_HARDWARE_NAME_CHARS 32
/* maximum size of unicode names, including terminator */
#define MAX_RDN_BYTES (2*(MAX_RDN_CHARS + 1))
#define MAX_DN_BYTES (2*(MAX_DN_CHARS + 1))
#define MAX_SCHEMA_NAME_BYTES (2*(MAX_SCHEMA_NAME_CHARS + 1))
#define MAX_ASN1_NAME 32
#define MAX_VALUE (63U * 1024U)
#define MAX_VALUES_IN_RDN (MAX_RDN_CHARS / 2)
#define MAX_RDNS_IN_DN (MAX_DN_CHARS / 2 + 1)
#define MAX_TUNED_NAME_SIZE (12 + MAX_DN_BYTES + 20 * MAX_RDNS_IN_DN)
#define MAX_LOCAL_CHAR_SIZE 5 /* escape and 4 hex digits */
#define MAX_LOCAL_DN_SIZE (MAX_LOCAL_CHAR_SIZE * MAX_DN_CHARS + 1)
typedef enum DELIMIX /* indicies into an array of delimiter characters */
{
/* the elements of the delimiter array of indicies
* DI_CFG_TYPED and DI_CFG_ESC_STRINGS aren't really delimiters
* but are booleans. If the corresponding delimiter is
* DELIM_CFG_TRUE then output names are preferred with types for
* DI_CFG_TYPED and non-mappable characters in string output is
* mapped to an escape followed by 4 hex digits for
* DI_CFG_ESC_STRINGS. DI_WILD is used for patterns, after that
* DI_REL must be the first actual delimiter index and
* all DI_* values must be contiguous up to and including DI_COUNT
*/
DI_INVALID = -1, DI_CFG_TYPED = 0, DI_CFG_ESC_STRINGS,
DI_REL, DI_RDN, DI_DV, DI_VALUE, DI_WILD, DI_ESC, DI_EOS, DI_COUNT
} DELIMIX;
#define DELIM_CFG_TRUE '1'
#define DELIM_CFG_FALSE '0'
#define DELIM_WILD '*' /* delimiter in filters */
#define DELIM_VALUE '=' /* delimiter in names */
#define DELIM_DV '+' /* delimiter in names */
/* delimiters in dot form names */
#define DELIM_DF_RDN '.'
#define DELIM_DF_ESCAPE '\\'
/* delimiters in slash form names */
#define DELIM_SF_RDN '\\'
#define DELIM_SF_ESCAPE '\''
#define DELIM_SF_RELATIVE '.'
/* delimiters in SAP form names */
#define DELIM_SAP_ESCAPE '^'
/* unicode characters not accepted by DS */
#define UNI_BYTE_ORDER_MARK 0xfeff
#define UNI_SWAPPED_BYTE_ORDER_MARK 0xfffe
#define UNI_REPLACEMENT_CHAR 0xfffd
#define UNI_NON_CHAR 0xffff
/* special entry names in ACLs */
#define DS_ROOT_NAME "[Root]"
#define DS_PUBLIC_NAME "[Public]"
#define DS_MASK_NAME "[Inheritance Mask]"
#define DS_CREATOR_NAME "[Creator]" /* can only be used in AddEntry */
#define DS_SELF_NAME "[Self]" /* can only be used in AddEntry */
/* special attribute names in ACLs */
#define DS_ALL_ATTRS_NAME "[All Attributes Rights]"
#define DS_ENTRY_RIGHTS_NAME "[Entry Rights]"
typedef enum SYNTAX
{
SYN_UNKNOWN, /* 0 */
SYN_DIST_NAME, /* 1 */
SYN_CE_STRING, /* 2 */
SYN_CI_STRING, /* 3 */
SYN_PR_STRING, /* 4 */
SYN_NU_STRING, /* 5 */
SYN_CI_LIST, /* 6 */
SYN_BOOLEAN, /* 7 */
SYN_INTEGER, /* 8 */
SYN_OCTET_STRING, /* 9 */
SYN_TEL_NUMBER, /* 10 */
SYN_FAX_NUMBER, /* 11 */
SYN_NET_ADDRESS, /* 12 */
SYN_OCTET_LIST, /* 13 */
SYN_EMAIL_ADDRESS, /* 14 */
SYN_PATH, /* 15 */
SYN_REPLICA_POINTER, /* 16 */
SYN_OBJECT_ACL, /* 17 */
SYN_PO_ADDRESS, /* 18 */
SYN_TIMESTAMP, /* 19 */
SYN_CLASS_NAME, /* 20 */
SYN_STREAM, /* 21 */
SYN_COUNTER, /* 22 */
SYN_BACK_LINK, /* 23 */
SYN_TIME, /* 24 */
SYN_TYPED_NAME, /* 25 */
SYN_HOLD, /* 26 */
SYN_INTERVAL, /* 27 */
SYNTAX_COUNT /* 37 */
} SYNTAX;
typedef enum NAME_SPACE_TYPE
{
DS_DOS, DS_MACINTOSH, DS_UNIX, DS_FTAM, DS_OS2
} NAME_SPACE_TYPE;
typedef enum REPLICA_TYPE
{
RT_MASTER, RT_SECONDARY, RT_READONLY, RT_SUBREF, RT_COUNT
} REPLICA_TYPE;
#define RF_NO_HIDDEN 0x8000L
#define RF_NO_SECURE 0x4000L
#define RF_CACHE_ONLY 0x2000L
typedef enum REPLICA_STATE
{
RS_ON, RS_NEW_REPLICA, RS_DYING_REPLICA,
RS_LOCKED, RS_CRT_0, RS_CRT_1,
RS_TRANSITION_ON, RS_DEAD_REPLICA, RS_BEGIN_ADD,
RS_MASTER_START = 11, RS_MASTER_DONE, RS_FEDERATED,
RS_SS_0 = 48, RS_SS_1,
RS_JS_0 = 64, RS_JS_1, RS_JS_2,
RS_MS_0 = 80, RS_MS_1,
RS_COUNT
} REPLICA_STATE;
typedef enum NET_ADDRESS_TYPE
{
NT_IPX, NT_IP, NT_SDLC, NT_TOKENRING_ETHERNET,
NT_OSI, NT_APPLETALK, NT_NETBEUI, NT_SOCKADDR,
NT_UDP, NT_TCP, NT_UDP6, NT_TCP6, NT_INTERNAL,
NT_URL, NT_COUNT
} NET_ADDRESS_TYPE;
/* Auxillary net address types are replicated in the referral,
* but are not bound to an actual protocol stack.
*/
#define IS_AUX_NT(type) ((type) == NT_URL)
typedef enum NCP_SERVER_STATUS
{
DS_UNKNOWN, DS_DOWN, DS_UP
} NCP_SERVER_STATUS;
#define IPX_ADDRESS_LEN 12
#define IP_ADDRESS_LEN 6
#define IP6_ADDRESS_LEN 22
typedef enum EMAIL_ADDRESS_TYPE
{
SMF70 = 1, SMF71, SMTP, X400, SNADS, PROFS
} EMAIL_ADDRESS_TYPE;
typedef enum REPLICA_SAP_CONFIGURATION
{
REPLICA_SAP_ROOT_MOST, REPLICA_SAP_NEVER, REPLICA_SAP_ALWAYS
} REPLICA_SAP_CONFIGURATION;
typedef enum BACKUP_RESTORE_TAGS
{
BKR_CREATE_DIBSET, BKR_RESTORE_ENTRIES, BKR_RESTORE_PARTITIONS,
BKR_RESTORE_FILE, BKR_RESTORE_BASE, BKR_RESTORE_STREAMS
} BACKUP_RESTORE_TAGS;
/* federation state flags */
#define FEDERATION_DISABLED 0x0001
/*---------------------------------------------------------------------------
* definitions used by Access Control
*/
#define DS_ENTRY_BROWSE 0x00000001L
#define DS_ENTRY_ADD 0x00000002L
#define DS_ENTRY_DELETE 0x00000004L
#define DS_ENTRY_RENAME 0x00000008L
#define DS_ENTRY_SUPERVISOR 0x00000010L
#define DS_ENTRY_INHERIT_CTL 0x00000040L
#define DS_ENTRY_MASK (DS_ENTRY_BROWSE | DS_ENTRY_ADD \
| DS_ENTRY_DELETE | DS_ENTRY_RENAME \
| DS_ENTRY_SUPERVISOR | DS_ENTRY_INHERIT_CTL)
#define DS_ATTR_COMPARE 0x00000001L
#define DS_ATTR_READ 0x00000002L
#define DS_ATTR_WRITE 0x00000004L
#define DS_ATTR_SELF 0x00000008L
#define DS_ATTR_SUPERVISOR 0x00000020L
#define DS_ATTR_INHERIT_CTL 0x00000040L
#define DS_ATTR_MASK (DS_ATTR_COMPARE | DS_ATTR_READ | DS_ATTR_WRITE \
| DS_ATTR_SELF | DS_ATTR_SUPERVISOR \
| DS_ATTR_INHERIT_CTL)
#if DS_ENTRY_INHERIT_CTL != DS_ATTR_INHERIT_CTL
#error DS_ENTRY_INHERIT_CTL and DS_ATTR_INHERIT_CTL must be equal
#endif
/*---------------------------------------------------------------------------
* Bit definitions used by object manipulation APIs for the
* User Flags and System Flags attributes on Schema Ojbects
*/
/* User Flags */
#define SCU_SINGLE_VALUED_ATTR 0x00000001L
#define SCU_PUBLIC_READ 0x00000002L
#define SCU_WRITE_MANAGED 0x00000004L
#define SCU_PER_REPLICA 0x00000008L
#define SCU_READ_ONLY_ATTR 0x00000010L
#define SCU_SCHEDULE_SYNC_IMMEDIATE 0x00000020L
#define SCU_SCHEDULE_SYNC_URGENT 0x00000040L
#define SCU_SCHEDULE_SYNC_NEVER 0x00000080L
#define SCU_CONTAINER_CLASS 0x00000100L /* class objects */
#define SCU_EFFECTIVE_CLASS 0x00000200L /* class objects */
#define SCU_SECURE 0x00000400L
#define SCU_CACHE 0x00000800L
/* System Flags */
#define SCS_NONREMOVABLE 0x00000001L
#define SCS_READ_ONLY_ATTR 0x00000002L
#define SCS_HIDDEN_ATTR 0x00000004L
#define SCS_SERVER_READ 0x00000008L
#define SCS_AMBIGUOUS_CONTAINMENT 0x00000010L /* class objects */
#define SCS_AMBIGUOUS_NAMING 0x00000020L /* class objects */
#define SCS_CAN_BE_USED_IN_NAMING 0x00000040L
/*===========================================================================*/
#endif