Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 17 Data Types and Structures

LDAPFiltInfo

LDAPFiltInfo represents information about a filter in the filter configuration file. When you call the ldap_getfirstfilter() or ldap_getnextfilter() routines to get a filter from the filter configuration file, the routines return a pointer to an LDAPFiltInfo structure containing the information about the filter.

LDAPFiltInfo is defined as follows:

typedef struct ldap_filt_info {
   char *lfi_filter;
   char *lfi_desc;
   int lfi_scope;
   int lfi_isexact;
   struct ldap_filt_info *lfi_next;
} LDAPFiltInfo;
The fields in this structure are described below:

lfi_filter

The filter (for example, (cn=d*)).

lfi_desc

Description of the filter (the fifth field in the filter configuration file).

lfi_scope

The scope of the filter (the sixth field in the filter configuration file), which can be one of the following values:

If the scope of the filter is not specified in the filter configuration file, the scope is LDAP_SCOPE_SUBTREE by default.

lfi_isexact

Specifies whether or not the filter is an exact filter (an exact filter contains no wildcards and does not match words that sound alike):

lfi_next

Pointer to the LDAPFiltInfo structure representing the next filter in the filter list.

The following section of code prints out information about a filter:

LDAPFiltInfo *lfip;
/* Print out the filter */
printf( "Filter:\t%s\n", lfdp->lfd_filter );
printf( "Description:\t%s\n", lfdp->lfd_desc );
For example, in the filter configuration file, if the first filter that applies to the value "@" is:

"@" " " "(mail=%v)" "email address is" "onelevel"
the code prints out:

Filter: (mail=@) 
Description: email address is

Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:05:28