#### Static Declarations

The following are the static declarations you need:

/*****************************************************************/

/* Here are the objects that contain the string values for each */

/* part of the CDS entry's global name... */

static OM_descriptor Country_String_Object[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_COUNTRY_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_PRINTABLE_STRING, OM_STRING("US")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Organization_String_Object[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_ORG_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_PRINTABLE_STRING, OM_STRING("OSF")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Org_Unit_String_Object[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_ORG_UNIT_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_PRINTABLE_STRING, OM_STRING("DCE")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Hosts_Dir_String_Object[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DSX_TYPELESS_RDN),

{DS_ATTRIBUTE_VALUES, OM_S_PRINTABLE_STRING, OM_STRING("hosts")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Tamburlaine_Dir_String_Object[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DSX_TYPELESS_RDN),

{DS_ATTRIBUTE_VALUES, OM_S_PRINTABLE_STRING, OM_STRING("tamburlaine")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Self_Entry_String_Object[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DSX_TYPELESS_RDN),

{DS_ATTRIBUTE_VALUES, OM_S_PRINTABLE_STRING, OM_STRING("self")},

OM_NULL_DESCRIPTOR

};

The string objects are contained by a next-higher level of objects that identify the strings as being pieces (RDNs) of a fully qualified directory entry name (DN). Thus, the Country_RDN object contains Country_String_Object as the value of its DS_AVAS attribute; Organization_RDN contains Organization_String_Object, and so on.

/*****************************************************************/

/* Here are the "relative distinguished name" objects.

static OM_descriptor Country_RDN[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, Country_String_Object}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Organization_RDN[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, Organization_String_Object}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Org_Unit_RDN[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, Org_Unit_String_Object}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Hosts_Dir_RDN[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, Hosts_Dir_String_Object}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Tamburlaine_Dir_RDN[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, Tamburlaine_Dir_String_Object}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor Self_Entry_RDN[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, Self_Entry_String_Object}},

OM_NULL_DESCRIPTOR

};

At the highest level, all the subobjects are gathered together in the DN object named Full_Entry_Name_Object.

/***********************************************************/

static OM_descriptor Full_Entry_Name_Object[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_DN),

{DS_RDNS, OM_S_OBJECT, {0, Country_RDN}},

{DS_RDNS, OM_S_OBJECT, {0, Organization_RDN}},

{DS_RDNS, OM_S_OBJECT, {0, Org_Unit_RDN}},

{DS_RDNS, OM_S_OBJECT, {0, Hosts_Dir_RDN}},

{DS_RDNS, OM_S_OBJECT, {0, Tamburlaine_Dir_RDN}},

{DS_RDNS, OM_S_OBJECT, {0, Self_Entry_RDN}},

OM_NULL_DESCRIPTOR

};

####