4.1.3.1 Client Behavior When Sending the IDL_DRSBind Request

The client uses puuidClientDsa to pass an identifier. If the client uses the returned DRS_HANDLE for subsequent calls to the IDL_DRSWriteSPN method, then the client MUST pass NTDSAPI_CLIENT_GUID in puuidClientDsa. For any other uses, the server places no constraints on the value of puuidClientDsa other than those specified in section 4.1.3.2.<11>

The client uses pextClient to pass a properly initialized DRS_EXTENSIONS_INT structure to the server. If the client is a DC, it reads the value of msDS-ReplicationEpoch from its nTDSDSA object and assigns this value to the dwReplEpoch field of the DRS_EXTENSIONS_INT structure; otherwise, it sets the dwReplEpoch field of the DRS_EXTENSIONS_INT structure to zero. If the client is a DC, it reads the value of objectGUID from the Config NC object and assigns this value to the ConfigObjGUID field of the DRS_EXTENSIONS_INT structure; otherwise, it sets the ConfigObjGUID field of the DRS_EXTENSIONS_INT structure to the NULL GUID value.

The remaining information in the DRS_EXTENSIONS_INT structure must be consistent with the client's capabilities. This information affects the versions of response structures that the server returns in method calls using the DRS_HANDLE returned by IDL_DRSBind. In descriptions of method calls that use a DRS_HANDLE, this handle is sometimes called the client's RPC context.<12>

If a method of this protocol takes a parameter named dwInVersion, the client uses that parameter to specify the version of the referent of the next parameter to that method, often named pmsgIn. The referent of this parameter is called the method's request. The dwInVersion parameter is called the request version. For example, if the client passes dwInVersion = 7 to IDL_DRSGetNCChanges, the client also passes a DRS_MSG_GETCHGREQ_V7 request.

If a method of this protocol takes an integer parameter named pdwOutVersion, the server uses that parameter to return the version number of the referent of the next parameter to that method, often named pmsgOut. The referent of this parameter is called the method's response. The referent of pdwOutVersion is called the response version. For example, when the server returns pdwOutVersion^ = 9 from IDL_DRSGetNCChanges, the server also returns a DRS_MSG_GETCHGREPLY_V9 response.

Most methods in this protocol are capable of generating only a certain response version from a certain request version. The following special cases apply:

  • IDL_DRSGetNCChanges is capable of returning a version 6 response from version 7, version 8, and version 10 requests. However, the DRS_EXT_GETCHGREPLY_V6 bit must be set in the client's RPC context for the server to generate a version 6 response. Otherwise, the server returns ERROR_REVISION_MISMATCH. Note that whenever IDL_DRSGetNCChanges is capable of returning a version 6 response, it is also capable of returning a version 7 response, which is a compressed form of a version 6 response. Compression of IDL_DRSGetNCChanges responses is not controlled by the state of the client's RPC context; it is controlled on a per-request basis by the client; see DRS_USE_COMPRESSION in section 5.41.

  • IDL_DRSGetNCChanges is capable of returning a version 9 response from version 10 requests. However, the DRS_EXT_GETCHGREPLY_V9 bit must be set in the client's RPC context for the server to generate a version 9 response. Otherwise, the server returns ERROR_REVISION_MISMATCH. Note that whenever IDL_DRSGetNCChanges is capable of returning a version 9 response, it is also capable of returning a version 7 response, which is a compressed form of a version 9 response. Compression of IDL_DRSGetNCChanges responses is not controlled by the state of the client's RPC context; it is controlled on a per-request basis by the client; see DRS_USE_COMPRESSION in section 5.41.

  • IDL_DRSAddEntry can generate either a version 2 or version 3 response from either a version 2 or version 3 request. The server generates a version 3 response when DRS_EXT_ADDENTRYREPLY_V3 is set in the client's RPC context; otherwise, the server generates a version 2 response.

  • IDL_DRSDomainControllerInfo has only one request version; it contains an InfoLevel field. The InfoLevel, not the dwInputVersion, determines the response version. Similarly, IDL_DRSGetReplInfo has two request versions, which both contain an InfoType field. The InfoType, not the dwInputVersion, determines the response version.

The following tables describe how the server determines the response version based on the request version, the DRS_EXTENSIONS_INT structure specified when creating the DRS_HANDLE, and in some cases, the contents of the request message.

IDL_DRSReplicaSync

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

-

IDL_DRSGetNCChanges

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

4

-

1

5

-

1

7

DRS_EXT_GETCHGREPLY_V6

6

8

DRS_EXT_GETCHGREPLY_V6

6

10

DRS_EXT_GETCHGREPLY_V6

6

10

DRS_EXT_GETCHGREPLY_V9

9

10

DRS_EXT_GETCHGREPLY_V9, DRS_EXT_GETCHGREPLY_V6

9

IDL_DRSUpdateRefs

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

-

IDL_DRSReplicaAdd

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

-

2

-

-

IDL_DRSReplicaDel

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

-

IDL_DRSReplicaModify

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

-

IDL_DRSVerifyNames

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSGetMemberships

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSInterDomainMove

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

2

-

2

IDL_DRSGetNT4ChangeLog

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSCrackNames

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSWriteSPN

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSRemoveDsServer

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSRemoveDsDomain

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSDomainControllerInfo

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

request.InfoLevel 1

IDL_DRSAddEntry

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

2

-

2

3

-

2

2

DRS_EXT_ADDENTRYREPLY_V3

3

3

DRS_EXT_ADDENTRYREPLY_V3

3

IDL_DRSExecuteKCC

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSGetReplInfo

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

request.InfoType 2

2

-

request.InfoType 2

IDL_DRSAddSidHistory

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSGetMemberships2

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSReplicaVerifyObjects

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

-

IDL_DRSGetObjectExistence

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSQuerySitesByCost

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSInitDemotion

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSReplicaDemotion

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSFinishDemotion

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSAddCloneDC

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSWriteNgcKey

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DRSReadNgcKey

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DSAPrepareScript

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

IDL_DSAExecuteScript

Request version

DRS_EXTENSIONS bit set in client's RPC context

Response version

1

-

1

1 Possible values are 0x1, 0x2, and 0xffffffff (see section 4.1.5).

2 Possible values are detailed in section 4.1.13.