PreviousNext

Registering Interfaces

A server calls the rpc_server_register_if( ) routine to tell the RPC runtime about a specific RPC interface. Registering an interface informs the runtime that the server is offering that interface and makes it available to clients. A server can register any number of interfaces with the RPC runtime by calling the rpc_server_register_if( ) routine once for each set of procedures, or manager, that implements an interface.

To offer more than one manager for an interface, a server must register each manager separately.

When registering an interface, the server provides the following information:

· Interface specification

This is a reference to information about an RPC interface as offered by its server stub. The DCE IDL compiler generates an interface specification as part of the stub code. For a specific version of an interface, all managers use the same interface specification. Information in an interface specification that concerns application developers includes the following:

- The interface identifier (UUID and major and minor version numbers)

- The supported transfer syntaxes

- A list of any well-known endpoints (and their associated protocol sequences) specified in the interface definition (.idl) file

- The interface's default manager entry point vector (manager EPV), if present

A default manager EPV, constructed using the operation names of the interface definition, is typically generated for stubs by the DCE IDL compiler (the -no_mepv compiler option suppresses this feature).

· A type UUID for the manager

Each implementation of an interface, a manager, is represented by a type UUID.

· A manager EPV for the interface

A server can register a given interface more than once by specifying a different type UUID and manager EPV each time it calls rpc_server_register_if( ).

A manager EPV is a list of the addresses (the entry points of the remote procedures provided by the manager) that represent the location of each remote procedure implementation. A manager EPV must contain exactly one entry point for each procedure defined in the interface definition.

The server can use the default manager EPV only once, and only for a manager that uses the procedure names as they are declared in the interface definition. For any additional manager of the RPC interface, (and if the server needs to rename the implemented procedures), the server must create and register a unique manager EPV. Also, each manager must be associated with a distinct type UUID.