rpc_cs_binding_set_tags- places code set tags into a server binding handle
void rpc_cs_binding_set_tags( rpc_binding_handle_t *binding, unsigned32 sending_tag, unsigned32 desired_receiving_tag, unsigned16 sending_tag_max_bytes, error_status_t *status);
- On input, specifies the server binding handle to modify with tag information. This handle is the binding handle returned by the rpc_ns_binding_import_next() or rpc_ns_binding_select() routines.
On output, returns the server binding handle modified with code set tag information. The server stub retrieves the tag information from the binding handle and uses it to invoke the appropriate buffer sizing and code set conversion routines.
- Specifies the code set value for the code set in which client data to be sent to the server is to be encoded. If the client is not sending any data, set this value to the client's current code set. This step prevents the code set conversion routine from being invoked.
- Specifies the code set value for the code set in which the client prefers data to be encoded when sent back from the server. If the client is not planning to receive any data from the server, set this value to the server's current code set. This step prevents the code set conversion routine from being invoked.
- Specifies the maximum number of bytes that a code set requires to encode one character. The value is the c_max_bytes value associated with the code set value (c_set) used as the sending_tag value.
- Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.
Possible status codes and their meanings include:
The routine was unable to allocate memory to encode the value.
The routine can also return status codes generated by the rpc_rgy_get_codesets() routine.
The rpc_cs_binding_set_tags() routine is used by client applications to add code sets tag information to the binding handle of a compatible server. The tag information specified in the routine is usually obtained from a character and code sets evaluation routine. The routine is one of those used for character and code set interoperability, which permits clients and servers to transfer international character data in a heterogeneous character set and code sets environment.
The clients specifies the code set encoding it is using to transmit international character data to the server, the maximum number of bytes required to encode one character in that code set, and the code set encoding it prefers the server to use when returning international character data.
Because the rpc_cs_eval_with_universal() and rpc_cs_eval_without_universal() routines set tag information in the server binding handle as part of their operation, client applications that use them do not need to call the rpc_cs_binding_set_tags() routine. However, any further code set evaluation implementations need to include a mechanism for setting tags in a server binding handle. The rpc_cs_binding_set_tags() routine provides this function and can be used in user-written evaluation routines or alone if the application does not need to perform evaluation, providing a short cut for applications that do not need to evaluate for character and code set compatibility.
Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.