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

slapi_attr_basetype()

Returns the base type of an attribute.

Syntax

#include "slapi-plugin.h"
char *slapi_attr_basetype( char *type, char *buf, size_t bufsiz );

Parameters

This function takes the following parameters:

type

Attribute type from which you wish to get the base type.

buf

Buffer to hold the returned base type.

bufsiz

Size of the buffer.

Returns

This function returns NULL if the base type fits in the buffer. If the base type is longer than the buffer, the function allocates memory for the base type and returns a pointer to it.

Description

This function returns the base type of an attribute (for example, if given cn;lang-jp, returns cn).

Memory Concerns

You should free the returned base type when you are finished by calling slapi_ch_free().

See Also

slapi_attr_get_type()

slapi_attr_type_cmp()

slapi_attr_types_equivalent()