2
0

ldap_api_fn.h 1.6 KB

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