ldap_api_fn.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * $Id$
  3. *
  4. * Kamailio LDAP Module
  5. *
  6. * Copyright (C) 2007 University of North Carolina
  7. *
  8. * Original author: Christian Schlatter, [email protected]
  9. *
  10. *
  11. * This file is part of Kamailio, a free SIP server.
  12. *
  13. * Kamailio is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2 of the License, or
  16. * (at your option) any later version
  17. *
  18. * Kamailio is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  26. *
  27. * History:
  28. * --------
  29. * 2007-02-18: Initial version
  30. */
  31. #ifndef LDAP_API_FN_H
  32. #define LDAP_API_FN_H
  33. #include <ldap.h>
  34. #include "../../str.h"
  35. #include "../../sr_module.h"
  36. #define LDAP_MAX_FILTER_LEN 1024
  37. /*
  38. * LDAP API functions
  39. */
  40. int ldap_params_search(
  41. int* _ld_result_count,
  42. char* _lds_name,
  43. char* _dn,
  44. int _scope,
  45. char** _attrs,
  46. char* _filter,
  47. ...);
  48. int ldap_url_search(
  49. char* _ldap_url,
  50. int* _ld_result_count);
  51. int ldap_get_attr_vals(
  52. str *_attr_name,
  53. struct berval ***_vals);
  54. int ldap_inc_result_pointer(void);
  55. int ldap_str2scope(char* scope_str);
  56. int get_ldap_handle(char* _lds_name, LDAP** _ldap_handle);
  57. void get_last_ldap_result(LDAP** _last_ldap_handle,
  58. LDAPMessage** _last_ldap_result);
  59. #endif /* LDAP_API_FN_H */