OSF DCE Application Development Guide--Core Components

Basic RPC Routine Usage
13.2.3 Selecting RPC Protocol Sequences
A server can inquire about whether the local RPC runtime supports a specific protocol
sequence by using the rpc_network_is_protseq_valid() routine. The server can also use
the rpc_network_inq_protseqs() routine to ask the RPC runtime for a list of all
protocol sequences supported by both the RPC runtime and the operating system.
To prepare to receive remote procedure calls, a server uses
rpc_server_use_all_protseqs() or rpc_server_use_protseq( ) calls to tell the RPC
runtime to use at least one protocol sequence. For each protocol combination, the RPC
runtime creates one or more binding handles with dynamic endpoints on which the server
will listen for remote procedure calls. The server then can use a list of these binding
handles to register dynamic endpoints in the endpoint map and to export its binding
information (except the endpoints) to the name service.
As an option, an interface can contain one or more well-known endpoints, each of which
is accompanied by a protocol sequence. A server uses the
rpc_server_use_all_protseqs_if(), rpc_server_use_protseq_if(),orrpc_server_-
use_protseq_ep( ), to notify the RPC runtime about which protocol sequence and well-
known endpoint combinations will be used.
A server can use any protocol sequence declared in an interface endpoint declaration, or
the server can ignore the endpoint declarations, as long as it registers at least one
endpoint.
13.2.4 Obtaining a List of Server Binding Handles
After a server passes to the RPC runtime the protocol sequences over which it will listen
for remote procedure calls, the RPC runtime constructs server binding handles. Each
binding handle refers to a complement of binding information that defines one potential
binding; that is, a specific RPC protocol sequence, RPC protocol major version, network
address, endpoint, and transfer syntax that an RPC client can use to establish a binding
with an RPC server.
Before registering endpoints or exporting binding information, a server must obtain a list
of its binding handles from the RPC runtime by using the rpc_server_inq_bindings()
routine. The server passes this list back to the runtime as an argument when registering
endpoints and exporting binding information.
13.2.5 Registering Endpoints
Servers can use well-known or dynamic endpoints with any protocol sequence.
When a server asks the runtime to use a dynamic endpoint with a protocol sequence, the
runtime asks the operating system to generate the endpoint. To use the dynamic
endpoints, a server must register the server’s binding information, including the
endpoints, by using the rpc_ep_register() routine. For each combination of RPC
124245 Tandem Computers Incorporated 137