OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
4. Register both sets of binding handles with the endpoint map
5. Export both sets of binding handles to the namespace
Note that (for brevity’s sake) status return checks have been omitted from this code.
<. . .>
/* Register server interface/type_uuid/epv associations */
/* with rpc runtime. */
rpc_server_register_if(timop_v1_0_s_ifspec, &type_uuid,
(rpc_mgr_epv_t)&manager_epv, &status);
/* Register serviceability remote interface with rpc */
/* runtime ... */
rpc_server_register_if(serviceability_v1_0_s_ifspec, &type_uuid,
(rpc_mgr_epv_t)&dce_svc_epv, &status);
<. . .>
/* Tell rpc runtime we want to use all supported protocol */
/* sequences. */
rpc_server_use_all_protseqs(MAX_CONC_CALLS_PROTSEQ, &status);
/* Get server binding handles ... */
rpc_server_inq_bindings(&hello_bind_vector_p, &status);
/* Get binding handles for serviceability remote */
/* interface ... */
rpc_server_inq_bindings(&svc_bind_vector_p, &status);
<. . .>
/* Register endpoints with server interface ... */
rpc_ep_register(hello_v1_0_s_ifspec, hello_bind_vector_p,
(uuid_vector_t *)&obj_uuid_vec,
(unsigned_char_t *)"hello server, version 1.0",
&status);
/* Register endpoints with serviceability interface ... */
rpc_ep_register(serviceability_v1_0_s_ifspec, svc_bind_vector_p,
(uuid_vector_t *)&obj_uuid_vec,
(unsigned_char_t *)"Hello SVC",
&status);
/* Export server interface binding info to the namespace. */
rpc_ns_binding_export(rpc_c_ns_syntax_dce, server_name,
hello_v1_0_s_ifspec, hello_bind_vector_p,
(uuid_vector_t *)&obj_uuid_vec, &status);
4 −44 Tandem Computers Incorporated 124245