NWDSCompare(3nw)
NWDSCompare --
compares an object's attribute value with a specified value
Synopsis
#include <nwnet.h>
or
#include <nwdsdsa.h>
NWDSCCODE N_API NWDSCompare
(NWDSContextHandle context,
pnstr8 objectName,
pBuf_T buf,
pnbool8 matched);
Description
The parameters are as follows:
- context
-
(IN) Specifies the Directory context for the request.
- objectName
-
(IN) Points to the name of the object whose attribute is being compared.
- buf
-
(IN) Points to a request buffer containing the attribute name and value to be compared with the object's attribute value.
- matched
-
(OUT) Points to a boolean value indicating the result of the comparison.
Return values
- 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 comparison is in the form of ``attribute name=attribute value.'' For example, the attribute name ``Description'' and the value ``PostScript'' might be used to determine if a
particular printer's page description language is PostScript.
matched receives a Boolean indicating the result of the comparison. The result is TRUE if the comparison was successful, otherwise the result is FALSE.
Follow these steps to compare an object's attribute value with another value:
-
Allocate a request buffer by calling NWDSAllocBuf.
-
Initialize the request buffer for a DSV_COMPARE operation by calling NWDSInitBuf.
-
Place the name of the attribute whose value you want to compare into the request buffer by calling NWDSPutAttrName.
-
Place the value you want to compare into the buffer by calling NWDSPutAttrVal.
-
Compare the values by calling NWDSCompare.
-
Check matched to see if the values matched.
-
Free the request buffer by calling NWDSFreeBuf.
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
NWDSRead(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.