ldap_exp_fn.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_EXP_FN_H
  27. #define LDAP_EXP_FN_H
  28. #include "../../str.h"
  29. #include "../../pvar.h"
  30. #include "../../parser/msg_parser.h"
  31. #include "../../re.h"
  32. struct ldap_result_params
  33. {
  34. str ldap_attr_name;
  35. int dst_avp_val_type; /* 0: str, 1: int */
  36. pv_spec_t dst_avp_spec;
  37. };
  38. struct ldap_result_check_params
  39. {
  40. str ldap_attr_name;
  41. pv_elem_p check_str_elem_p;
  42. };
  43. int ldap_search_impl(
  44. struct sip_msg* _msg,
  45. pv_elem_t* _ldap_url);
  46. int ldap_write_result(
  47. struct sip_msg* _msg,
  48. struct ldap_result_params* _lrp,
  49. struct subst_expr* _se);
  50. int ldap_result_next(void);
  51. int ldap_filter_url_encode(
  52. struct sip_msg* _msg,
  53. pv_elem_t* _filter_component,
  54. pv_spec_t* _dst_avp_spec);
  55. int rfc2254_escape(
  56. struct sip_msg* _msg,
  57. char* _value,
  58. char* _avp_name);
  59. int ldap_result_check(
  60. struct sip_msg* _msg,
  61. struct ldap_result_check_params* _lrp,
  62. struct subst_expr* _se);
  63. #endif /* LDAP_EXP_FN_H */