ldap_api_fn.h

Go to the documentation of this file.
00001 /*
00002  * $Id: ldap_api_fn.h 5003 2008-09-26 11:01:51Z henningw $
00003  *
00004  * Kamailio LDAP Module
00005  *
00006  * Copyright (C) 2007 University of North Carolina
00007  *
00008  * Original author: Christian Schlatter, cs@unc.edu
00009  *
00010  *
00011  * This file is part of Kamailio, a free SIP server.
00012  *
00013  * Kamailio is free software; you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation; either version 2 of the License, or
00016  * (at your option) any later version
00017  *
00018  * Kamailio is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program; if not, write to the Free Software
00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  *
00027  * History:
00028  * --------
00029  * 2007-02-18: Initial version
00030  */
00031 
00032 
00033 #ifndef LDAP_API_FN_H
00034 #define LDAP_API_FN_H
00035 
00036 #include <ldap.h>
00037 
00038 #include "../../str.h"
00039 #include "../../sr_module.h"
00040 
00041 #define LDAP_MAX_FILTER_LEN 1024
00042 
00043 /*
00044 * LDAP API functions
00045 */
00046 int ldap_params_search(
00047    int* _ld_result_count,
00048    char* _lds_name,
00049    char* _dn,
00050    int _scope,
00051    char** _attrs,
00052    char* _filter,
00053    ...);
00054 
00055 int ldap_url_search(
00056    char* _ldap_url,
00057    int* _ld_result_count);
00058 
00059 int ldap_get_attr_vals(
00060    str *_attr_name,
00061    struct berval ***_vals);
00062 
00063 int ldap_inc_result_pointer(void);
00064 
00065 int ldap_str2scope(char* scope_str);
00066 
00067 int get_ldap_handle(char* _lds_name, LDAP** _ldap_handle);
00068 
00069 void get_last_ldap_result(LDAP** _last_ldap_handle, 
00070       LDAPMessage** _last_ldap_result);
00071 
00072 #endif /* LDAP_API_FN_H */

Generated on Wed May 23 18:00:28 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6