NWDSAddPartition(3nw)


NWDSAddPartition -- creates the root object of a new Directory partition

Synopsis

   #include <nwnet.h> 
   or 
   #include <nwdspart.h> 
   

NWDSCCODE N_API NWDSAddPartition (NWDSContextHandle context, pnstr8 server, pnstr8 partitionRoot, pnint32 iterationHandle, nbool8 more, pBuf_T objectInfo);

Description

The parameters are as follows:

context
(IN) Specifies the Directory context for the request.

server
(IN) Points to the name of the server where the partition is to be added.

partitionRoot
(IN) Points to the name of the root object of the new partition. (New object being created.)

iterationHandle
(IN/OUT) Rserved; pass in 0.

more
(IN) Reserved; pass in NULL.

objectInfo
(IN) Points to the attributes which define the root object of the new partition.

Return values

0x0000
SUCCESSFUL

Negative Value
Negative values indicate errors. For errors returned by Directory Services, see ``Directory Services OS Errors'' (-001 to -255), ``Directory Services Client Library Errors'' (-301 to -399), or ``Directory Services Agent in the Server Errors'' (-601 to -699).

0x8996
SERVER_OUT_OF_MEMORY

0x89E2
TOO_FEW_FRAGMENTS

0x89E3
TOO_MANY_FRAGMENTS

0x89E4
PROTOCOL_VIOLATION

0x89E5
SIZE_LIMIT_EXCEEDED

0x89FD
UNKNOWN_REQUEST

0x89FD
INVALID_PACKET_LENGTH

0x89FE
BAD_PACKET

0x89FF
Failure not related to Directory Services

Notices

The initial partition replica will always be of type RT_MASTER, which is enumerated in NWDSDEFS.H.

server identifies the server where the master replica of the new partition is to be stored.

objectInfo points to Buf_T containing attribute information which, together with information from the partition root name, constitutes the object to be created. The buffer is prepared by using the following steps:

  1. Allocate the request buffer by calling NWDSAllocBuf.

  2. Initialize the request buffer for an DSV_ADD_PARTITION operation by calling NWDSInitBuf.

  3. Place the name of one of the object's attributes in the request buffer by calling NWDSPutAttrName.

  4. Place a value for the attribute (in step 3) in the buffer by calling NWDSPutAttrVal.

  5. Loop to step 3 until the names and values for all of the desired attributes have been placed in the buffer.

  6. Add the new partition by calling NWDSAddPartition.

  7. Free the request buffer when it is no longer needed by calling NWDSFreeBuf.

The type of attribute information needed to create the partition object is listed in the ``Expanded Class Definitions'' chapter of NetWare® Directory Services(TM) Schema Specification. The user can add any attributes to the partition object that are not read only. Values for other partition attributes are assigned automatically.

Aliases are never dereferenced by NWDSAddReplica. The setting of the Directory context flag associated with DCV_DEREF_ALIASES is not relevant and is ignored.

You cannot call NWDSAddObject to create a partition; you must call either NWDSAddPartition or NWDSSplitPartition to do so.

Additional replicas of a partition can be added to the system by calling NWDSAddReplica.

Services

Directory

NCP calls

0x2222 23 17 Get File Server Information
0x2222 23 22 Get Station's Logged Info (old)
0x2222 23 28 Get Station's Logged Info
0x2222 104 01 Ping for NDS NCP
0x2222 104 02 Send NDS Fragmented Request/Reply

References

NWDSAddReplica(3nw), NWDSJoinPartitions(3nw), NWDSListPartitions(3nw), NWDSRemovePartition(3nw), NWDSSplitPartition(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.