DCE for the HP e3000 (B3821-90003)

66 Chapter7
Programming with RPC 1.2.1 on MPE/iX
} else
PRINT_FUNC(PRINT_HANDLE, "Bindings:\n");
/*
* Print out the bindings obtained from the RPC runtime. This info is
* only for debugging purposes -- it shows what protocol sequence and
* ports have been grabbed by the runtime for this server.
*/
for (i = 0; i < bvec->count; i++) {
/* rpc_binding_to_string_binding() --
*
* Convert a binding handle to a string binding for printing. The
* first parameter is a binding handle. (In a binding vector there
* are bvec->count binding handles). The second parameter is a
* pointer to a dce string data type; memory will be allocated and
* the value returned in it. The application must free this memory.
* The third parameter is the DCE error status.
*/
rpc_binding_to_string_binding(bvec->binding_h[i], /* a binding handle */
&string_binding, /* returned string form */
&st); /* error status for this call */
if (st != rpc_s_ok) {
dce_error_inq_text(st, dce_err_string, (int *)&_ignore);
PRINT_FUNC(PRINT_HANDLE, "Cannot get string binding: %s\n",
dce_err_string);
} else
PRINT_FUNC(PRINT_HANDLE, " %s\n", string_binding);
/*
* Free the memory allocated in rpc_binding_to_string_binding().
*/
rpc_string_free(&string_binding, &_ignore);
}
/* rpc_ep_register() --
*
* Register the interface with the endpoint mapper. The first parameter
* is the interface specification generated by the IDL compiler. The