PreviousNext

Code Sets Array

The code sets array contains the list of the code sets that a client or server supports. The structure consists of a version number member (version), followed by a count member (count), followed by an array of code set data structures (rpc_cs_c_set_t). This array is declared to be a conformant array so that its size will be determined at runtime. The count member indicates the number of code sets contained in the array.

The first element in the code sets array represents the client or server process's local code set.

The second element through the nth element represents one or more intermediate code sets that the process can use to transmit character data over the network. Client or server processes can convert into an intermediate code set when their host system does not provide a converter for the other's local code set but does provide a converter for the intermediate code set.

DCE RPC routines for character/code sets compatibility evaluation and code set conversion support one intermediate code set, which is the ISO 10646 Universal character/code set. Consequently, DCE requires host systems running applications that transfer international characters to provide converters for this code set.

System administrators for machines in internationalized DCE cells (that is, cells of machines that run applications that use the DCE character/code sets compatibility evaluation and conversion functionality) and who want to use other intermediate code sets can run the csrc utility and specify that their intermediate code set(s) be used in preference to ISO 10646.

The remaining elements in the array represent other code sets that the process's host supports (that is, code sets for which the system provides converters).

The C language representation of a code set structure is as follows:

typedef struct rpc_codeset_mgmt_t{

ungned32 version;

long count;

[size_is(count)] rpc_cs_c_set_t codesets[];

} rpc_codeset_mgmt_t, *rpc_codeset_mgmt_p_t;

Client and server applications and DCE RPC routines for automatic code set conversion obtain a code sets array by calling the routine rpc_rgy_get_codesets( ). Server applications user the code sets array as input to the rpc_ns_mgmt_set_attribute( ) routine, which registers their supported code sets in the name service database. Client applications look up a server's supported code sets in the name service database by calling the routine rpc_ns_mgmt_read_codesets( ) and then use their code sets array to evaluate their supported code sets against the code sets that the server supports.

The following DCE RPC routines require a code sets array and show an argument data type of rpc_codeset_mgmt_t:

· rpc_ns_mgmt_read_codesets( )

· rpc_rgy_get_codesets( )

Server applications that use the routine rpc_ns_mgmt_set_attribute( ) to register their supported code sets in the name service database also specify the code sets array, but show an argument data type of void.