NWDSReadAttrDef(3nw)
NWDSReadAttrDef --
retrieves information about Directory Schema attribute definitions
Synopsis
#include <nwnet.h>
or
#include <nwdssch.h>
NWDSCCODE N_API NWDSReadAttrDef
(NWDSContextHandle context,
nuint32 infoType,
nbool8 allAttrs,
pBuf_T attrNames,
pnint32 iterationHandle,
pBuf_T attrDefs);
Description
The parameters are as follows:
- context
-
(IN) Specifies the Directory context for the request.
- infoType
-
(IN) Specifies the information type desired (names only, or names and definitions).
- allAttrs
-
(IN) Specifies whether information for all attributes or for selected attributes should be returned.
- attrNames
-
(IN) Points to a request buffer containing the attribute names whose definitions are to be returned.
- iterationHandle
-
(IN/OUT) Points to information needed to resume subsequent iterations of NWDSReadAttrDef.
- attrDefs
-
(OUT) Points to a result buffer that receives the requested attribute names and/or definitions.
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
- N0x89E4
-
PROTOCOL_VIOLATION
- 0x89E5
-
SIZE_LIMIT_EXCEEDED
- 0x89FD
-
UNKNOWN_REQUEST
- 0x89FD
-
INVALID_PACKET_LENGTH
- 0x89FE
-
BAD_PACKET
- 0x89FF
-
Failure not related to Directory Services
Notices
infoType, allAttrs, and attrNames indicate what Directory Schema attribute information is requested.
infoType specifies whether both attribute names and attribute
definitions will be retrieved, or only attribute names. The types of choices
are the following:
- 0
-
DS_ATTR_DEF_NAMES (attribute names only)
- 1
-
DS_ATTR_DEFS (attribute names and definitions)
If allAttrs is TRUE, information about all attributes in
the Directory Schema is requested. In this case, attrNames is
ignored and can be set to NULL. If
allAttrs is FALSE, attrNames must point to a request buffer containing the attribute names whose information is to be retrieved.
attrNames points to a request buffer containing the attribute names whose information is to be returned.
iterationHandle controls retrieval of results that are larger than the result buffer pointed to by attrDefs.
Before the initial call to NWDSReadAttrDef, set the contents of the
iteration handle pointed to by iterationHandle to NO_MORE_ITERATIONS.
If, when NWDSReadAttrDef returns from its initial call and the result buffer holds the complete results, the location pointed to by
iterationHandle is set to NO_MORE_ITERATIONS. If the
iteration handle is not set to NO_MORE_ITERATIONS, use the iteration handle for subsequent calls to NWDSReadAttrDef in order to obtain
further portions of the results. When the results are completely retrieved,
the contents of the iteration handle will be set to NO_MORE_ITERATIONS.
NOTE:
To end the Read operation before the complete results have been retrieved,
call NWDSCloseIteration with a value of DSV_READ_ATTR_DEF to free memory and states
associated with NWDSReadAttrDef.
The level of granularity for partial results is an individual attribute definition.
attrDefs points to a request buffer containing the requested attribute information. This buffer either contains a list of attribute names, or a sequence of attribute
names and definitions depending upon the value of infoType mentioned above.
Retrieve information about selected attribute definitions using the following steps:
-
Allocate a request buffer by calling NWDSAllocBuf. (If you want information about all attributes, you do not need an request buffer and can skip steps 1 through 3.
-
Initialize the request buffer for a DSV_READ_ATTR_DEF operation by calling
NWDSInitBuf.
-
For each attribute whose information you want to retrieve, store the attribute's name in the request buffer by calling NWDSPutAttrName.
-
Allocate a result buffer by calling NWDSAllocBuf. (This buffer does not need to be initialized since it is a result buffer.)
-
Set the contents of the iteration handle to NO_MORE_ITERATIONS.
-
Call NWDSGetAttrDef with infoType set to DS_ATTR_DEF_NAMES to retrieve names only, or with DS_ATRR_DEFS to retrieve names and attribute definitions. Set
allAttrs to FALSE if you are using a request buffer, or to
TRUE if you are not using a request buffer.
-
Determine the number of attributes whose information is in the result buffer by calling NWDSGetAttrCount.
-
For each attribute in the buffer, remove the attribute information by calling NWDSGetAttrDef.
-
If the iteration handle is not set to NO_MORE_ITERATIONS, loop to
step 6 to retrieve additional attribute information. Otherwise, go to step 10.
-
Free the request buffer by calling NWDSFreeBuf.
-
Free the result buffer by calling NWDSFreeBuf.
See
NWDSGetAttrDef(3nw)
to see the type of information returned in the buffer.
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
NWDSReadClassDef(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.