ldap_exp_fn.h 1.9 KB

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