Previous section.

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

NAME

rpc_ns_mgmt_set_attribute- adds an attribute to a server entry in the name service database

SYNOPSIS

#include <dce/rpc.h>
#include <dce/nsattrid.h>

void rpc_ns_mgmt_set_attribute( unsigned32 entry_name_syntax, unsigned_char_t *entry_name, uuid_t *attr_type, void *attr_value, error_status_t *status);

PARAMETERS

Input

entry_name_syntax
An integer value that specifies the syntax of the entry_name argument. To use the syntax that is specified in the RPC_DEFAULT_ENTRY_SYNTAX environment variable, specify rpc_c_ns_syntax_default.

entry_name
Specifies the name of the server entry in the name service database with which the attribute will be associated. The name can be either the global or cell-relative name. When this routine is used to add a code sets attribute to a server entry in the Cell Directory Service (CDS) database, then this argument specifies the CDS name of the server entry to which to the code sets attribute is to be added.

attr_type
A UUID that specifies the attribute type. This value must be rpc_c_attr_codesets.

attr_val
An opaque data structure that specifies the attribute value to be stored in the name service database. If you are using this routine to add a code sets attribute to a server entry, you must cast the representation of the code set data from the data type rpc_codeset_mgmt_p_t to the data type void*.

Output

status
Returns the status code from this routine. This 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_mgmt_bad_type

The attribute type specified in the call does not match that of the attribute to be added to the name service database.

rpc_s_name_service_unavailable

The routine was unable to communicate with the name service.

rpc_s_incomplete_name

The name specified in the call cannot be expanded.

rpc_s_invalid_name_syntax

The name syntax specified in the call is not valid.

rpc_s_entry_not_found

The specified name service entry was not found.

rpc_s_no_memory

The routine was unable to allocate memory to encode the value.

rpc_s_no_ns_permission

The routine's caller does not have the proper permission for an NSI operation.

DESCRIPTION

The rpc_ns_mgmt_set_attribute() routine adds the specified attribute value to a server entry in the name service database. It is particularly useful in establishing character and code set interoperability, which permits clients and servers to transfer international character data in a heterogeneous character set and code sets environment.

The rpc_ns_mgmt_set_attribute() routine can be used in an application's server initialization routine to add a code sets attribute to the server's entry in the CDS database (which the initialization routine has created with the rpc_ns_binding_export() routine). Because CDS stores integer values in little-endian format, the rpc_ns_mgmt_set_attribute() routine also encodes the code sets attribute value into an endian-safe format before storing it in the name service database.

A management application can call the rpc_ns_mgmt_set_attribute() routine to add an attribute to a server entry in the name service database on behalf of an application that does not itself have the necessary name service permissions to add one.

Permissions Required

You need both read permission and write permission to the target server entry in the name service. You also need insert permission to the parent directory.

RETURN VALUE

None.

SEE ALSO



rpc_ns_mgmt_read_codesets()
rpc_ns_mgmt_remove_attribute()
rpc_rgy_get_codesets().


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