rpc_ns_binding_export- establishes a name service database entry with binding handles and/or object UUIDs for a server
void rpc_ns_binding_export( unsigned32 entry_name_syntax, unsigned_char_t *entry_name, rpc_if_handle_t if_handle, rpc_binding_vector_t *binding_vec, uuid_vector_t *object_uuid_vec, unsigned32 *status);
- An integer value that specifies the syntax of argument entry_name. See
Name Syntax Constantsfor the possible values of this argument.
The value rpc_c_ns_syntax_default specifies the syntax specified by the RPC_DEFAULT_ENTRY_SYNTAX environment variable.
- The name of the entry to which binding handles and/or object UUIDs are exported. The entry name syntax is identified by the argument entry_name_syntax.
- Identifies the interface to export. Specifying the value NULL indicates that there are no binding handles to export, and the binding_vec argument is ignored.
- Specifies a vector of server bindings to export. The application specifies the value NULL for this argument when there are no binding handles to export.
- Identifies a vector of object UUIDs offered by the application. The application constructs this vector. NULL indicates that there are no object UUIDs to export.
- Returns the status code from this routine. The status code indicates whether the routine completed successfully, or if not, why not.
Possible status codes and their meanings include:
Name service unavailable.
No permission for name service operation.
Unsupported name syntax.
The rpc_ns_binding_export() routine allows a server application to make bindings to an interface it offers available in a name service. A server application can also use this routine to make available the object UUIDs of application resources.
To export an interface, the server application calls rpc_ns_binding_export() with an interface and server binding handles that reference bindings a client can use to access the server.
A server can export interfaces and objects in a single call to this routine, or it can export them separately.
If the entry in the name service database specified by the entry_name argument does not exist, the rpc_ns_binding_export() routine tries to create it. In this case a server must have the correct permissions to create the entry.
Before calling the rpc_ns_binding_export() routine to export interfaces (but not to export object UUIDs), a server must do the following:
- Register one or more protocol sequences with the local RPC run-time system by calling the one of the following routines:
- rpc_server_use_protseq() rpc_server_use_protseq_if() rpc_server_use_protseq_ep() rpc_server_use_all_protseqs() rpc_server_use_all_protseqs_if()
- Obtain a list of server bindings by calling the rpc_server_inq_bindings() routine.
The application uses the vector returned from the rpc_server_inq_bindings() routine to supply the binding_vec argument for rpc_ns_binding_export(). To prevent a binding from being exported, the application can set the selected vector element to the value NULL.
In addition to calling rpc_ns_binding_export(), a server that calls either of the routines rpc_server_use_all_protseqs() or rpc_server_use_protseq() must also register with the local endpoint map by calling the rpc_ep_register() or rpc_ep_register_no_replace() routines.
If a server exports an interface to the same entry in the name service database more than once, the second and subsequent calls to this routine add the binding information and object UUIDs only if they differ from the ones in the server entry. Existing data is not removed from the entry.
The application needs both read permission and write permission to the target name service entry. If the entry does not exist, the application also needs insert permission to the parent directory.
Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.