security_events.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 2011, Digium, Inc.
  5. *
  6. * Michael L. Young <elgueromexicano@gmail.com>
  7. *
  8. * See http://www.asterisk.org for more information about
  9. * the Asterisk project. Please do not directly contact
  10. * any of the maintainers of this project for assistance;
  11. * the project provides a web site, mailing lists and IRC
  12. * channels for your use.
  13. *
  14. * This program is free software, distributed under the terms of
  15. * the GNU General Public License Version 2. See the LICENSE file
  16. * at the top of the source tree.
  17. */
  18. /*!
  19. * \file
  20. *
  21. * \brief Generate security events in the SIP channel
  22. *
  23. * \author Michael L. Young <elgueromexicano@gmail.com>
  24. */
  25. #include "sip.h"
  26. #ifndef _SIP_SECURITY_EVENTS_H
  27. #define _SIP_SECURITY_EVENTS_H
  28. void sip_report_invalid_peer(const struct sip_pvt *p);
  29. void sip_report_failed_acl(const struct sip_pvt *p, const char *aclname);
  30. void sip_report_inval_password(const struct sip_pvt *p, const char *responsechallenge, const char *responsehash);
  31. void sip_report_auth_success(const struct sip_pvt *p, uint32_t using_password);
  32. void sip_report_session_limit(const struct sip_pvt *p);
  33. void sip_report_failed_challenge_response(const struct sip_pvt *p, const char *response, const char *expected_response);
  34. void sip_report_chal_sent(const struct sip_pvt *p);
  35. void sip_report_inval_transport(const struct sip_pvt *p, const char *transport);
  36. void sip_digest_parser(char *c, struct digestkeys *keys);
  37. int sip_report_security_event(const char *peer, struct ast_sockaddr *addr, const struct sip_pvt *p,
  38. const struct sip_request *req, const int res);
  39. #endif