OSF DCE Application Development Guide--Introduction and Style Guide
Introduction to DCE Application Programming
• After a failure of the server it can be restarted
If dced did not start the server, it cannot control it. Therefore, one of the first things your
server should do is to verify that dced started it by obtaining the configuration
information, as in the following:
server_t *server_conf;
.
.
.
dce_server_inq_server(&server_conf, &status);
if(status != error_status_ok) {
.
.
.
Additional routines, such as dce_server_inq_uuids( ) and dce_server_inq_attr(), are
also useful for obtaining information from dced about the running server.
Robust servers usually perform some or all of the following initialization tasks:
• Set up for serviceability which includes establishing message routing, debug levels,
and internal message tables.
• Set up the server’s objects. This includes creating and storing UUIDs for all
necessary objects and object types, and grouping objects by type.
• Set up the security environment which includes setting authentication information,
establishing the server’s principal identity, and creating ACL managers for each type
of ACL object.
• Define manager entry point vectors (EPVs) for each set of interface operations.
• Register the server with DCE. This includes the following: registering the interfaces
and the associated EPVs for the operations, establishing the network protocol
sequences and endpoints on which the server will listen, registering endpoints and
other binding information in the endpoint mapper service, and exporting binding
information to the CDS namespace.
• Specify how the server will be multithreaded.
• Listen for incoming requests for remote procedure calls.
• Clean up the program state and environment affected by the server prior to the
server’s termination.
1.5.1 Setting Up for Serviceability
Serviceability standardizes the server messages displayed or logged. It acts on a set of
standard message catalogs and application-specific catalogs generated from the sams
utility. Some of the obvious advantages the serviceability facility gives servers over
using the standard C library routines such as printf( ) and fprintf( ) include the
following:
124246 Tandem Computers Incorporated 1− 13