19.5. slapi_attr_flag_is_set()

Description

This function determines if certain flags are set for a particular attribute. These flags can identify an attribute as a single-valued attribute, an operational attribute, or as a read-only attribute.

Syntax

#include "slapi-plugin.h"int slapi_attr_flag_is_set( const Slapi_Attr *attr, unsigned long flag );

Parameters

This function takes the following parameters:

attr Attribute that you want to check.
flag Flag to check in the attribute.
The value of the flag argument can be one of the following:
SLAPI_ATTR_FLAG_SINGLE Flag that determines if the attribute is single-valued.
SLAPI_ATTR_FLAG_OPATTR Flag that determines if the attribute is an operational attribute.
SLAPI_ATTR_FLAG_READONLY Flag that determines if the attribute is read-only.
Returns

This function returns one of the following values:

  • 1 if the specified flag is set.
  • 0 if the specified flag is not set.