Each DCE host has an endpoint map that contains a mapping of servers to endpoints. Each endpoint map server entry is associated with an array of services (interfaces) provided by the server, and each service is associated with an array of objects supported by the service.
When a typical server calls the dce_server_register( ) routine, the RPC runtime generates the endpoints on which the server will listen for calls and then uses the dced endpoint mapper service of the local host to register the endpoints. Later, when a typical client makes a remote procedure call, its RPC runtime uses the server host's endpoint mapper service to find the server. When the typical server shuts down, it calls the dce_server_unregister( ) routine to remove its endpoints from the endpoint map so that clients do not later try to bind to it.
Applications can also use the lower-level rpc_ep_register( ) and associated RPC routines. Since the endpoint map is essential for RPCs to work, endpoints are fully described in RPC Fundamentals and the endpoint map structure is described with respect to routing of RPCs in Overview - Topics in RPC Application Development.
The endpoint map is for the most part maintained automatically by dced. For example, it periodically removes "stale" endpoints so that the RPC runtime will not try to complete a binding for a client to a server that is no longer running. However, administrative applications may find it necessary to peruse a remote endpoint map and even remove specific endpoints from a local host's endpoint map.
To read the elements of a remote endpoint map, applications use a loop with the set of routines rpc_mgmt_ep_elt_inq_begin( ), rpc_mgmt_ep_elt_inq_next( ), and rpc_mgmt_ep_elt_inq_done( ). The inquiry can return all elements until the list is exhausted, or the inquiry can be restricted to return elements for the following:
· Elements matching an interface identifier (UUID and version number)
· Elements matching an object UUID
· Elements matching both an interface identifier and object UUID
Administrators can manage the endpoint map by using dcecp with the endpoint object.
You can use the dced_server_disable_if( ) routine to mark as disabled all the endpoints for a specific interface. This will prevent any new RPCs with partial bindings from binding to the server for this interface, but not prevent clients from using the interface if they already have a full binding with these endpoints. You can use the dced_server_enable_if( ) routine to reenable previously disabled interfaces. In an extreme situation, you could permanently remove endpoints directly from the local endpoint map by calling the rpc_mgmt_ep_unregister( ) routine. This function cannot be done remotely for security reasons.