19.21. slapi_attr_value_cmp()

Description

Compares two values for a given attribute to determine if they are equal.

Syntax

#include "slapi-plugin.h"
int slapi_attr_value_cmp( const Slapi_Attr *attr, const struct berval *v1, const struct berval *v2 );

Parameters

This function takes the following parameters:

attr Attribute used to determine how these values are compared; for example, if the attribute contains case-insensitive strings, the strings are compared without regard to case.
v1 Pointer to the structure containing the first value that you want to compare.
v2 Pointer to the structure containing the second value that you want to compare.
Returns

This function returns one of the following values:

  • 0 if the values are equal.
  • -1 if the values are not equal.