ldap_create_filter() routine constructs an LDAP search filter. For more information about filters, see "Creating Filters Programmatically" on page 165.
#include <ldap.h>
int ldap_create_filter( char *buf, unsigned long buflen,
char *pattern, char *prefix, char *suffix, char *attr,
char *value, char **valwords );
buf | |
buflen | |
pattern | |
prefix | |
suffix | |
attr | |
value | |
valwords |
LDAP_SUCCESS if successful. LDAP_SIZELIMIT_EXCEEDED if the created filter exceeds the size of the buffer.LDAP_PARAM_ERROR if an invalid parameter was passed to the function. (mail=bjensen@airius.com).
char buf[LDAP_FILT_MAXSIZ];
char *pattern = "(%a=%v)";
char *attr = "mail";
char *value = "bjensen@airius.com";
...
ldap_create_filter( buf, LDAP_FILT_MAXSIZ, pattern, NULL, NULL, attr,
value, NULL );
...
ldap_init_getfilter(), ldap_init_getfilter_buf(), ldap_getfirstfilter(), ldap_getnextfilter(), ldap_set_filter_additions().
Last Updated: 10/01/98 17:06:23