Attribute data structures

An attribute’s metadata is represented by a CS_ATTRIBUTE structure:

typedef struct _cs_attribute
 {
     CS_OID          attr_type;
     CS_INT          attr_syntax;
     CS_INT          attr_numvals;
 } CS_ATTRIBUTE;

where:

An attribute’s value(s) are represented by a CS_ATTRVALUE union:

typedef struct _cs_ds_lookup_info
 {
     CS_OID          *objclass;
     CS_CHAR         *path;
     CS_INT          pathlen;
     CS_DS_OBJECT    *attrfilter;
     CS_DS_OBJECT    *attrselect;
 } CS_DS_LOOKUP_INFO;

Applications check the syntax field of the CS_ATTRIBUTE structure to determine which member of a CS_ATTRVALUE union contains the actual value. The following table shows the correspondence:

CS_ATTRIBUTE syntax specifier

CS_ATTRVALUE union member

CS_ATTR_SYNTAX_STRING

value_string

CS_ATTR_SYNTAX_BOOLEAN

value_boolean

CS_ATTR_SYNTAX_INTEGER

value_integer

CS_ATTR_SYNTAX_TRANADDR

value_tranaddr

CS_ATTR_SYNTAX_OID

value_oid

Figure 9-1 shows an exploded view of the CS_ATTRVALUE union and its member structures:

Figure 9-1: An exploded CS_ATTRVALUE union

This figure depicts CS underscore A T T R value, which comprises C S underscore STRING, C S underscore O I D, and C S underscore T R A N A D D R.