Sun Java System Directory Server Enterprise Edition 6.3 Developer's Guide

slapi_attr_type_cmp()

Compares two attribute types to determine if they are the same.

Syntax

#include "slapi-plugin.h"
 int slapi_attr_type_cmp( char *t1, char *t2, int opt );

Parameters

This function takes the following parameters:

t1

Name of the first attribute type that you want to compare.

t2

Name of the second attribute type that you want to compare.

opt

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.

Returns

This function returns 0 if the type names are equal, or a non-zero value if they are not equal.

See Also

slapi_attr_type_cmp()

slapi_attr_types_equivalent()

slapi_attr_basetype()