HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
19.19 slapi_attr_type_cmp()
Description Compares two attribute types to determine if they are the same.
Syntax
#include "slapi-plugin.h"
int slapi_attr_type_cmp( const char *t1, const char *t2, int opt );
Parameters This function takes the following parameters:
Name of the first attribute type that you want to compare.
t1
Name of the second attribute type that you want to compare.
t2
One of the following values:
0
Compare the types as-is.
1 Compare only the base names of the types (for example, if the type is cn;lang-en,
the function compares only the cn part of the type).
2
Ignore any options in the second type that are not in the first type. For example, if
the first type is cn and the second type is cn;lang-en, the lang-en option in the
second type is not part of the first type. In this case, the function considers the two
types to be the same.
opt
Returns This function returns one of the following values:
0 if the type names are equal.
A nonzero value if the type names are not equal.
See also
“slapi_attr_type2plugin()”
slapi_attr_get_type()
“slapi_attr_types_equivalent()”
“slapi_attr_basetype()”
19.20 slapi_attr_types_equivalent()
Description Compares two attribute names to determine if they represent the same attribute.
Syntax
#include "slapi-plugin.h"
int slapi_attr_types_equivalent( const char *t1, const char *t2 );
Parameters This function takes the following parameters:
Pointer to the first attribute type that you want to compare.
t1
Pointer to the second attributed type that you want to compare.
t2
Returns This function returns one of the following values:
1 if t1 and t2 represent the same attribute.
0 if t1 and t2 do not represent the same attribute.
See also
“slapi_attr_add_value()”
“slapi_attr_first_value()”
“slapi_attr_next_value()”
“slapi_attr_get_numvalues()”
slapi_attr_value_find()
19.19 slapi_attr_type_cmp() 179