PreviousNext

The DS_C_DS_DN Object

DS_C_DS_DN class objects are used to hold the full names of directory entries (distinguished names). You need an object of this class to pass directory entry names to the following XDS functions:

· ds_add_entry( )

· ds_compare( )

· ds_list( )

· ds_modify_entry( )

· ds_read( )

· ds_remove_entry( )

The following figure shows the attributes of a DS_C_DS_DN object.


DS_C_DS_DN Object Attributes

· OM_CLASS

The value of this attribute is an OID string that identifies the object's class; its value is DS_C_DS_DN.

· DS_RDNS

This is an attribute whose value is another object of class DS_C_DS_RDN (see The DS_C_DS_RDN Object). The DS_C_DS_RDN object is defined by a separate array of object descriptors whose base address is the value of the DS_RDNS attribute.

There are as many DS_RDNS attributes in a DS_C_DS_DN object as there are separate name components in the full directory entry name. For example, suppose you wanted to represent the following CDS entry name:

/.../C=US/O=OSF/OU=DCE/hosts/brazil/self

This would require a total of six instances of the DS_RDNS attribute in the DS_C_DS_DN object. The /.../ (global root prefix) is not represented. This means that another six object descriptor arrays are required to hold the RDN objects, as well as six object descriptors in the present object, one to hold (as the value of a DS_RDNS attribute) a pointer to each array.

Note that the order of these DS_RDNS attributes is significant; that is, the first DS_RDNS should contain as its value a pointer to the array representing the C=US part of the name; the next DS_RDNS should contain as its value a pointer to the array representing the O=OSF part, and so on. The root part of the name is not represented at all.