OSF DCE Application Development Guide--Introduction and Style Guide
OSF DCE Application Development Guide—Introduction and Style Guide
/*****
*
* create_server_uuid -- Create server instance UUID.
*
*
* Called from main(), make_server_entry().
*
*****/
void
create_server_uuid(
uuid_t *server_uuid,
uuid_vector_t *server_uuid_v
)
{
unsigned32 status;
dce_error_string_t error_string;
int print_status;
/********************************************************************/
/* Create a UUID to identify this server instance; this will go in- */
/* to the namespace and endpoint map so that clients of such gen- */
/* eric interfaces as rdacl can find this server’s endpoints. */
/* Without such a UUID, these clients can’t distinguish among */
/* servers on the same host that also export the generic inter- */
/* faces. This could be a well-known UUID, but here we will */
/* generate one on the fly. Clients binding to us by name will get */
/* this UUID without having to know what it is. */
/* */
/********************************************************************/
fprintf(stdout, "Entering create_server_uuid()...0);
/* Create and save server instance UUID... */
fprintf(stdout, "Calling uuid_create()...0);
uuid_create(server_uuid, &status);
if (status != error_status_ok)
{
dce_error_inq_text(status, error_string, &print_status);
fprintf(stdout, "uuid_create(): %s0, error_string);
exit(1);
}
server_uuid_v->uuid[0] = server_uuid;
server_uuid_v->count = 1;
fprintf(stdout, "...Exiting create_server_uuid()0);
}
A− 68 Tandem Computers Incorporated 124246