dce_server_register(3dce) — Subroutines
Name
dce_server_register - Registers a server with DCE
Synopsis
#include <dce/dced.h> void dce_server_register(
unsigned32 flags,
server_t ∗server,
dce_server_register_data_t ∗data,
dce_server_handle_t ∗server_handle,
error_status_t ∗status);
Parameters
Input
flagsSpecifies options for server registration. Combinations of the following values may be used:
dce_server_c_no_protseqs
dce_server_c_no_endpoints
dce_server_c_ns_export
serverSpecifies the server data, commonly obtained from dced by calling dce_server_inq_server(). The server_t structure is described in sec_intro(3sec).
dataSpecifies the array of data structures that contain the additional information required for the server to service requests for specific remote procedures. Each structure of the array includes the following:
•An interface handle (ifhandle) of type rpc_if_handle_t
•An entry point vector (epv) of type rpc_mgr_epv_t
•A number (num_types) of type unsigned32 representing the number in the following array
•An array of server types (types) of type dce_server_type_t
The dce_server_type_t structure contains a UUID (type) of type uuid_t representing the object type, and a manager entry point vector (epv) of type rpc_mgr_epv_t representing the set of procedures implemented for the object type.
Output
server_handle
Returns a server handle, which is a pointer to an opaque data structure containing information about the server.
statusReturns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.
Description
By default, the dce_server_register() routine registers a DCE server by establishing a server’s binding information for all valid protocol sequences, registering all the servers services with the RPC runtime, and entering the server’s endpoints in dced’s endpoint mapper service.
Prior to calling the dce_server_register() routine, the server obtains the server configuration data from dced by calling dce_server_inq_server(). The server must also set up an array of registration data, where the size of the array represents all the server’s services that are currently registered in the server configuration data of dced (server->services.count). If the memory for the array is dynamically allocated, it must not be freed until after the corresponding dce_server_unregister() routine is called.
You can modify the behavior of dce_server_register() Depending on the values of the flags parameter. If the flag has the value dce_server_c_ns_export, the the binding information is also exported to the namespace. The namespace entry is determined for each service by the server->services.list[i].entryname parameter. If this parameter has no value, the default value for the entire server is used (server->entryname). If the flag has the value dce_server_c_no_endpoints, the binding information is not registered with the endpoint map. Your application can use rpc_ep_register() to register specific binding information. If the flag has the value dce_server_c_no_protseqs, specific protocol sequences are used rather than all valid protocol sequences. Use of this flag requires that the server first call dce_server_use_protseq() at least once for a valid protocol sequence.
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.
error_status_ok
rpc_s_no_memory
Related Information
Functions: dce_server_inq_server(3dce), dce_server_sec_begin(3dce), dce_server_unregister(3dce), dced_intro(3dce), rpc_server_listen(3rpc).
Books: OSF DCE Application Development Guide.