Previous section.

CDE 1.1: Remote Procedure Call
Copyright © 1997 The Open Group

NAME

rpc_ns_profile_elt_add- adds an element to a profile; if necessary, creates the entry

SYNOPSIS

#include <dce/rpc.h>

void rpc_ns_profile_elt_add( unsigned32 profile_name_syntax, unsigned_char_t *profile_name, rpc_if_id_t *if_id, unsigned32 member_name_syntax, unsigned_char_t *member_name, unsigned32 priority, unsigned_char_t *annotation, unsigned32 *status);

PARAMETERS

Input

profile_name_syntax
An integer value that specifies the syntax of argument profile_name. (See Name Syntax Constants for 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.

profile_name
Specifies the RPC profile that receives the new element. The profile name syntax is identified by the argument profile_name_syntax.

if_id
Specifies the interface identifier of the new profile element. To add or replace the default profile element, specify NULL.

member_name_syntax
An integer value that specifies the syntax of argument member_name. (See Name Syntax Constants for 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.

member_name
Specifies an entry in the name service database to include in the new profile element. The member name syntax is identified by the argument member_name_syntax.

priority
An integer value (0 to 7) that specifies the relative priority for using the new profile element during the import and lookup operations. A value of 0 (zero) is the highest priority. A value of 7 is the lowest priority. Two or more elements can have the same priority.

The default profile element has a priority of 0. When adding the default profile, the result is unspecified if the application specifies a value other than 0 here.

annotation
Specifies an annotation string that is stored as part of the new profile element. The string can be up to rpc_c_annotation_max characters long, including the null terminator. The application specifies NULL or the empty string ("") if there is no annotation string.

Output

status
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:

rpc_s_ok
Success.

rpc_s_class_version_mismatch

Name service entry has incompatible RPC class version.

rpc_s_name_service_unavailable

Name service unavailable.

rpc_s_no_ns_permission

No permission for name service operation.

rpc_s_unsupported_name_syntax

Unsupported name syntax.

DESCRIPTION

The rpc_ns_profile_elt_add() routine adds an element to the profile attribute of the entry in the name service database specified by the profile_name argument.

If the profile_name entry does not exist, this routine creates the entry with a profile attribute and adds the profile element specified by the if_id, member_name, priority and annotation arguments. In this case, the application must have permission to create the entry.

If an element with the specified member name and interface identifier is already in the profile, this routine updates the element's priority and annotation string using the values provided in the priority and annotation arguments.

An application can add the entry in argument member_name to a profile before it creates the entry itself.

Permissions Required

The application needs both read permission and write permission for the target name service profile entry. If the entry does not exist, the application also needs insert permission for the parent directory.

RETURN VALUE

None.

SEE ALSO


rpc_if_inq_id()
rpc_ns_mgmt_entry_create()
rpc_ns_profile_elt_remove().

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.

Contents Next section Index