The data type declarations given here fall into three categories:
Applications that refer to the data types described here must include the C header file <dce/rpc.h>.
Some of RPC API function declarations and the remaining definitions given here make use of a set of unsigned integer data types. Each type holds an unsigned integer within a specified range, as shown in the following table.
Type Declaration | Range |
---|---|
unsigned8 | 0 to 28-1 |
unsigned16 | 0 to 216-1 |
unsigned32 | 0 to 232-1 |
The C-language bindings for these types are implementation-dependent.
The rpc_mgmt_set_cancel_timeout() routine uses the signed32 data type. This is an integer in the range -231 to 231-1.
RPC treats all characters in strings as unsigned characters. The
C-language binding of the unsigned character string type is
implementation-dependent. The unsigned character data type must be
able to encode the characters of the portable character set, as
specified in
A binding handle is an opaque data type that applications use to reference binding information maintained by the RPC run-time system. Depending on the binding information that it references, a binding handle is considered a server binding handle or a client binding handle.
A server binding handle references binding information for a server. Server binding handles appear as arguments to many RPC API routines, and they are used both by clients and servers to manipulate the bindings required for remote procedure calls.
A client binding handle references binding information for a client
that has made an RPC to a server. A client binding handle may be
provided to the server application as the first argument to the call.
(See
As described in
RPC API routines requiring a binding handle as an argument specify the data type rpc_binding_handle_t. Binding handle arguments are passed by value.
The following table lists RPC API routines that operate on binding handles, specifying the type of binding handle required by each routine.
Routine | Input Argument | Output Argument |
---|---|---|
cs_byte_from_netcs() | Server or client | None |
cs_byte_local_size() | Server or client | None |
cs_byte_net_size() | Server or client | None |
cs_byte_to_netcs() | Server or client | None |
rpc_binding_copy() | Server | Server |
rpc_binding_free() | Server | None |
rpc_binding_from_string_binding() | None | Server |
rpc_binding_inq_auth_caller() | Client | None |
rpc_binding_inq_auth_info() | Server | None |
rpc_binding_inq_object() | Server or client | None |
rpc_binding_reset() | Server | None |
rpc_binding_server_from_client() | Client | Server |
rpc_binding_set_auth_info() | Server | None |
rpc_binding_set_object() | Server | None |
rpc_binding_to_string_binding() | Server or client | None |
rpc_cs_binding_set_tags() | Server | Server |
rpc_cs_get_tags() | Server or client | None |
rpc_ep_resolve_binding() | Server | None |
rpc_mgmt_ep_elt_inq_begin() | Server | None |
rpc_mgmt_ep_elt_inq_next() | None | Server |
rpc_mgmt_ep_unregister() | Server | None |
rpc_mgmt_inq_com_timeout() | Server | None |
rpc_mgmt_inq_if_ids() | Server or client | None |
rpc_mgmt_inq_server_princ_name() | Server | None |
rpc_mgmt_inq_stats() | Server | None |
rpc_mgmt_is_server_listening() | Server | None |
rpc_mgmt_set_com_timeout() | Server | None |
rpc_mgmt_stop_server_listening() | Server | None |
rpc_ns_binding_import_next() | None | Server |
rpc_ns_binding_inq_entry_name() | Server | None |
rpc_ns_binding_select() | Server | Server |
rpc_ss_bind_authn_client() | Server | Server |
rpc_tower_to_binding() | None | Server or client |
rpc_tower_vector_to_binding() | Server or client | None |
wchar_t_from_netcs() | Server or client | None |
wchar_t_local_size() | Server or client | None |
wchar_t_net_size() | Server or client | None |
wchar_t_to_netcs() | Server or client | None |
An application can share a single binding handle across multiple threads of execution. The application must provide concurrency control for operations that read or modify a shared binding handle. The related routines are:
The binding vector data structure contains a list of binding handles over which a server application can receive remote procedure calls.
The C-language declaration is:
(The [1] subscript is a placeholder in the binding vector declaration. Applications use the count member to find the actual size of a returned binding vector.)
The RPC run-time system creates binding handles when a server application registers protocol sequences. To obtain a binding vector, a server application calls the rpc_server_inq_bindings() routine. A client application obtains a binding vector of compatible servers from the name service database by calling the rpc_ns_binding_lookup_next() routine. In both cases, the RPC run-time system allocates memory for the binding vector. An application calls the rpc_binding_vector_free() routine to free the binding vector.
To remove an individual binding handle from the vector, the application sets its value in the vector to NULL. When setting a vector element to NULL the application must:
Calling the rpc_binding_free() routine allows an application both to free the unwanted binding handle and to set the vector entry to NULL.
The following routines require a binding vector argument:
Routines that require a Boolean-valued argument or return a Boolean value specify the data type boolean32. RPC implementations define the Boolean constants TRUE and FALSE.
An endpoint map inquiry handle is an opaque data type that references inquiry state information used by a series of endpoint inquiry operations. The endpoint inquiry handle data type is rpc_ep_inq_handle_t. Applications obtain an endpoint map inquiry handle by calling rpc_mgmt_ep_elt_inq_begin() and use the handle for one or more calls to rpc_mgmt_ep_elt_inq_next(). Applications call rpc_mgmt_ep_elt_inq_done() to free an endpoint map handle.
Each stub declares an interface handle that can be used by application code to reference interface-related data maintained by the stub. The interface handle data type is rpc_if_handle_t. Applications refer to a stub-declared interface handle using a well-known name constructed as follows:
For the client:
if-name_vmajor-version_minor-version_c_ifspec
For the server:
if-name_vmajor-version_minor-version_s_ifspec
where:
Implementations must support a maximum if-name length of at least 17 characters.
The following routines specify an interface handle argument:
An interface identifier (interface ID) data structure contains
the interface UUID and major-version and minor-version numbers of
an interface. The C-language declaration is:
Applications can obtain an interface identifier by calling rpc_if_inq_id() with an interface handle. The following routines also require interface identifier arguments:
The interface identifier (ID) vector data structure holds a list of interface identifiers.
The C-language declaration is:
(The [1] subscript is a placeholder in the interface ID vector declaration. Applications use the count member to find the actual size of a returned vector.)
To obtain a vector of the interface IDs registered by a server with the RPC run-time system, an application calls the rpc_mgmt_inq_if_ids() routine. To obtain a vector of the interface IDs exported by a server to a name service database, an application calls the rpc_ns_mgmt_entry_inq_if_ids() routine.
The RPC run-time system allocates memory for the interface ID vector. The application calls the rpc_if_id_vector_free() routine to free the interface ID vector.
The server stub declares a default manager entry point vector
(EPV), which it uses to call the operations that implement an
interface. A manager EPV consists of a vector of pointers to the
operations of the interface. To declare the default manager EPV, the
stub defines an interface-specific manager EPV data type with the
following type name:
<if-name>_v<major-version>_<minor-version>_epv_t
The data type is defined as a C struct whose elements are pointers to the manager routines for the interface, with the same names and in the same order in which they appear in the IDL interface specification.
The stub declares the default manager EPV with the name NIDL_manager_epv.
Applications can use the stub-declared manager EPV data type to declare non-default manager EPVs. Applications initialise non-default manager EPVs with a vector of addresses of alternate manager routines. Applications that declare non-default manager EPVs must avoid the default name.
See
RPC API routines that obtain information from a name service use
opaque name service handles to refer to search state information
maintained by the run-time system. Applications obtain a name service handle
by calling one of the name service begin routines and use the handle
for one or more calls to the corresponding next routine.
Applications free a name service handle by calling one of the name
service done routines. For more information on name service handles
and operations, refer to
The name service handle data type is rpc_ns_handle_t.
The following routines require a name service handle argument:
A protocol sequence string is a character string that identifies a
protocol sequence. Protocol sequences are used to establish a
relationship between a client and server. Valid protocol sequence
strings are listed in
Routines that require a protocol sequence string argument specify the data type unsigned_char_t.
Not all valid protocol sequences are supported by all implementations. An application can use a specific protocol sequence only if the implementation supports that protocol.
A server chooses to accept remote procedure calls over some or all of the supported protocol sequences. The following routines allow server applications to register protocol sequences with the run-time system:
Applications can use protocol sequence strings to construct string bindings using the rpc_string_binding_compose() routine.
The protocol sequence vector data structure contains a list of protocol sequence strings. The protocol sequence vector contains a count member followed by an array of pointers to protocol sequence strings.
The C-language declaration is:
(The [1] subscript is a placeholder in the protocol sequence vector declaration. Applications use the count member to find the actual size of a returned binding vector.)
To obtain a protocol sequence vector, an application calls the rpc_network_inq_protseqs() routine. The RPC run-time system allocates memory for the protocol sequence vector. The application calls the rpc_protseq_vector_free() routine to free the protocol sequence vector.
A statistics vector is used to store statistics from the RPC run-time system for a server instance. The statistics vector contains a count member followed by an array of statistics.
The C-language declaration is:
(The [1] subscript is a placeholder in the statistics vector declaration. Applications use the count member to find the actual size of a returned binding vector.)
The X/Open DCE specifies four statistics that are returned in a statistics vector. The following constants are used to index the statistics array to extract specific statistics:
To obtain run-time statistics, an application calls the rpc_mgmt_inq_stats() routine. The RPC run-time system allocates memory for the statistics vector. The application calls the rpc_mgmt_stats_vector_free() routine to free the statistics vector.
A string binding contains the character representation of a binding handle.
The two formats of a string binding are shown below. The four
italicised fields represent the object UUID, RPC protocol sequence,
network address and endpoint and network options of the binding. A
delimiter character such as an @ (at sign) or a : (colon)
separates each field. A string binding does not contain any white space.
object-uuid @ rpc-protocol-sequence :
network-address [endpoint , option ...
or
object-uuid @ rpc-protocol-sequence :
network-address [endpoint = endpoint , option ...
This field is optional. If it is not provided the RPC run-time system assumes a nil type UUID.
This field is required.
The network address field is optional. If an application does not supply this field, the string binding refers to the local host.
The format and content of the endpoint depends on the specified protocol sequence. For the internet protocols, the format of the endpoint field is a single integer.
The endpoint field is optional.
The format and content of the option depends on the specified protocol sequence.
The option field is optional.
The \ (backslash) character is treated as an escape character for all string binding fields. It can be used to include one of the string delimiters in the value of a field.
A string UUID contains the character representation of a UUID.
A string UUID consists of multiple fields of hexadecimal characters.
Dashes separate the fields and each field has a fixed length, as
follows:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
For a detailed specification of string UUIDs, see
The following routines require a string UUID argument:
Universal Unique Identifiers (UUIDs) are opaque data structures that are
widely used by the RPC mechanism. The RPC API provides a series of
routines to manipulate UUIDs. Routines that take a UUID argument declare
the data type as uuid_t. (See
The UUID vector data structure contains a list of UUIDs. The UUID vector contains a count member, followed by an array of pointers to UUIDs.
The C-language declaration is:
The [1] subscript is a placeholder in the UUID vector declaration. Applications use the count member to find the actual size of a returned binding vector.
An application constructs a UUID vector to contain object UUIDs to be exported or unexported from the name service database. The following routines require a UUID vector argument:
Some RPC internationalisation support routines identify and convert
between code sets. The C-language declaration of a code set structure
is as follows:
The code set data structure is a member of the code sets array.
The C-language declaration of a code set structure is
as follows:
The array of code set data structures is declared as 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 following routines require code set data structure arguments:
Server applications that use the rpc_ns_mgmt_set_attribute() routine 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*.
The conversion type data structure is an enumerated type returned by
international character conversion buffer sizing routines.
The C-language declaration of a conversion type structure is
as follows:
The following routines require conversion type data structure arguments:
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.
Contents | Next section | Index |