DCE for the HP e3000 (B3821-90003)

Chapter 7 57
Programming with RPC 1.2.1 on MPE/iX
netaddr = (unsigned_char_t *)argv[1];
sleep_time = atoi(argv[2]);
}
/* rpc_string_binding_compose() --
*
* Create a string binding using the command line hostname parameter. A
* string binding must be converted into a binding handle, required by
* the DCE runtime, before it can be used.
*
* The first parameter is an optional object UUID. This application does
* not use multiple object UUIDs, so none is supplied. The second
* parameter is the protocol sequence to use to establish a connection;
* the "ip" parameter selects the UDP/IP protocol. The third parameter is
* the network address of the server; this was specified on the command
* line either as a hostname or as an IP address.
*
* The fourth parameter is an endpoint value (IP port number) to use; you
* should only specify this when creating a string binding if the
* endpoint is well-known. Most servers use a dynamic endpoint, chosen
* when the server starts up; so specify a value of NULL to cause the
* RPC runtime to determine the value during the RPC setup. The fifth
* parameter is for network options.
*
* The sixth parameter is the return argument where the string binding
* will be stored. New memory will be allocated for this return value;
* it must be freed later by this application. The final parameter is a
* DCE return status which will be checked for errors.
*/
rpc_string_binding_compose(NULL, /* no object UUID */
(unsigned_char_t *)"ip", /* protocol to use */
netaddr, /* network addr of server */
NULL, /* use a dynamic endpoint */
NULL, /* misc. network options */
&string_binding, /* returned string binding */
&st); /* error status for this call */
if (st != rpc_s_ok) {
/* dce_error_inq_text() --