PreviousNext

rpc_ns_import_ctx_add_eval(3rpc)

Adds an evaluation routine to an import context

Used by client applications.

Synopsis

#include <dce/rpc.h>

void rpc_ns_import_ctx_add_eval(

rpc_ns_handle_t *import_context,

unsigned32 function_type,

rpc_ns_handle_t *eval_args,

void *eval_func,

void *free_func,

error_status_t *status);

Parameters

Input

import_context
The name service handle obtained from the rpc_ns_binding_import_begin( ) routine.

func_type
The type of evaluation function. This value currently must be rpc_cs_code_eval_func.

eval_args
An opaque data type that data used by the evaluation routine.

Client applications adding a DCE RPC code sets evaluation routine (rpc_cs_eval_with_universal( ) or rpc_cs_eval_without_universal( )) specify the server's NSI entry name in this parameter.

eval_func
A function pointer to the evaluation routine to be called from the rpc_ns_binding_import_next( ) routine. The void declaration for eval_func means that the function does not return a value.

Client applications adding a DCE RPC code sets evaluation routine (rpc_cs_eval_with_universal( ) or rpc_cs_eval_without_universal( )) specify the routine name in this parameter.

free_func
A function pointer to a routine that is invoked from rpc_ns_binding_import_done( ) and which performs application-specific cleanup. Client applications adding a DCE RPC code sets evaluation routine (rpc_cs_eval_with_universal( ) or rpc_cs_eval_without_universal( )) specify NULL in this parameter.

Output

import_context
Returns the name service handle which contains the rpc_ns_binding_import_next( ) and rpc_ns_binding_import_done( ) routines.

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The rpc_ns_import_ctx_add_eval( ) routine adds an evaluation routine to an import context created by the rpc_ns_binding_import_begin( ) routine. The evaluation routine adds additional criteria to that used by rpc_ns_binding_import_next( ) (that is, protocol and interface information) for importing compatible server binding handles. Client applications call the rpc_ns_import_ctx_add_eval( ) routine once for each evaluation routine to be added to an import context (if there are multiple evaluation routines to be set up.)

If the user-specified evaluation routine needs to perform special cleanup functions, such as deleting a temporary file from a disk, use the free_func parameter to specify the cleanup routine to be called from rpc_ns_binding_import_done( ).

For DCE 1.1, client applications that transfer international character data in a heterogeneous character set and code set environment use the rpc_ns_import_ctx_add_eval( ) routine to add one or more code sets evaluation routines to the import context returned by the rpc_ns_binding_import_begin( ) routine. When the client application calls the rpc_ns_binding_import_next( ) routine to import compatible binding handles for servers, this routine calls the code sets evaluation routine, which applies client-server character set and code sets compatibility checking as another criteria for compatible binding selection.

The code sets compatibility evaluation routine specified can be one of the following:

rpc_cs_eval_with_universal
A DCE RPC code sets evaluation routine that evaluates character set and code sets compatibility between client and server. If client and server character sets are compatible, but their supported code sets are not, the routine sets code set tags that direct the client and/or server stubs to convert character data to either user-defined intermediate code sets (if they exist) or the DCE intermediate code set, which is the ISO 10646 (or universal) code set.

rpc_cs_eval_without_universal
A DCE RPC code sets evaluation routine that evaluates character set and code sets compatibility between client and server. If client and server character sets are compatible, but their supported code sets are not, the routine attempts to return the message rpc_s_no_compat_codesets to the rpc_ns_binding_import_next( ) routine.

application-supplied-routine
A user-written code sets evaluation routine. Application developers writing internationalized DCE applications can develop their own code sets evaluation routines for client-server code sets evaluation if the DCE-supplied routines do not meet their application's needs.

Restrictions

Client applications that add evaluation routines to server binding import context cannot use the automatic binding method to bind to a server.

Permissions Required
No permissions are required.

Return Values
No value is returned.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

rpc_s_ok
Success.

rpc_s_no_memory
The RPC runtime could not allocate heap storage.

rpc_s_invalid_ns_handle
The import_context parameter was not valid.

Related Information
Functions: rpc_cs_eval_with_universal(3rpc)

rpc_cs_eval_without_universal(3rpc)

rpc_ns_binding_import_begin(3rpc)

rpc_ns_binding_import_done(3rpc)

rpc_ns_binding_import_next(3rpc)

rpc_ns_mgmt_handle_set_exp_age(3rpc)