PreviousNext

rpc_ns_binding_inq_entry_name(3rpc)

Returns the name of an entry in the name service database from which the server binding handle came

Used by client applications.

Synopsis

#include <dce/rpc.h>

void rpc_ns_binding_inq_entry_name(

rpc_binding_handle_t binding,

unsigned32 entry_name_syntax,

unsigned_char_t **entry_name,

unsigned32 *status);

Parameters

Input

binding
Specifies a server binding handle whose entry name in the name service database is returned.

entry_name_syntax
An integer value that specifies the syntax of returned parameter entry_name.

To use the syntax specified in the RPC_DEFAULT_ENTRY_SYNTAX environment variable, provide the value rpc_c_ns_syntax_ default.

Output

entry_name
Returns the name of the entry in the name service database in which binding was found. The returned name is a global name.

Specify NULL to prevent the routine from returning this parameter. When you specify this value, the client does not need to call rpc_string_free( ).

status
Returns the status code from this routine, which indicates whether the routine completed successfully or, if not, why not.

Description
The rpc_ns_binding_inq_entry_name( ) routine returns the global name of the entry in the name service database from which a binding handle for a compatible server came.

The RPC runtime allocates memory for the string returned in the entry_name parameter. Your application calls rpc_string_free( ) to deallocate that memory.

An entry name is associated only with binding handles returned from the rpc_ns_binding_import_next( ), rpc_ns_binding_lookup_next( ), and rpc_ns_binding_select( ) routines.

If the binding handle specified in the binding parameter is not returned from an entry in the name service database (for example, the binding handle is created by calling rpc_binding_from_string_binding( )), this routine returns the rpc_s_no_entry_name status code.

Permissions Required
No permissions are required.

Return Values
No value is returned.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

rpc_s_ok
Success.

rpc_s_incomplete_name
Incomplete name.

rpc_s_invalid_binding
Invalid binding handle.

rpc_s_invalid_name_syntax
Invalid name syntax.

rpc_s_no_entry_name
No entry name for binding.

rpc_s_unsupported_name_syntax
Unsupported name syntax.

rpc_s_wrong_kind_of_binding
Wrong kind of binding for operation.

Related Information
Functions: rpc_binding_from_string_binding(3rpc)

rpc_ns_binding_import_next(3rpc)

rpc_ns_binding_lookup_next(3rpc)

rpc_ns_binding_select(3rpc)

rpc_string_free(3rpc)