33.18. slapi_mod_isvalid()

Determines whether a Slapi_Mod structure is valid.
Description

Use this function to verify that the contents of Slapi_Mod are valid. It is considered valid if the operation type is one of LDAP_MOD_ADD, LDAP_MOD_DELETE, or LDAP_MOD_REPLACE, combined using the bitwise or operator with LDAP_MOD_BYVALUES; the attribute type is not NULL; and there is at least one attribute value for add and replace operations.

Syntax

#include "slapi-plugin.h"
int slapi_mod_isvalid(const Slapi_Mod *mod);

Parameters

This function takes the following parameter:

smod
Pointer to a Slapi_Mod.
Returns

This function returns one of the following values:

  • 1 if the Slapi_Mod is valid.
  • 0 if the Slapi_Mod is not valid.