39.6. slapi_sdn_compare()

Description

This function compares two DNs, sdn1 and sdn2. The comparison is case sensitive.

Syntax

#include "slapi-plugin.h"
int slapi_sdn_compare( const Slapi_DN *sdn1, const Slapi_DN *sdn2 );

Parameters

This function takes the following parameters:

sdn1
DN to compare with the value in sdn2.
sdn2
DN to compare with the value in sdn1.
Returns

This function returns one of the following values:

  • 0 if sdn1 is equal to sdn2.
  • -1 if sdn1 is NULL.
  • 1 if sdn2 is NULL and sdn1 is not NULL.