2
0

parse_ppi_pai.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2013 Hugh Waite
  3. *
  4. * This file is part of Kamailio, a free SIP server.
  5. *
  6. * Kamailio is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version
  10. *
  11. * Kamailio is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. /*! \file
  21. * \brief Parser :: Parse P-Asserted-Identity: header
  22. *
  23. * \ingroup parser
  24. */
  25. #ifndef PARSE_PAI_PPI_H
  26. #define PARSE_PAI_PPI_H
  27. #include "../str.h"
  28. #include "msg_parser.h"
  29. #include "parse_to.h"
  30. typedef struct p_id_body {
  31. to_body_t *id;
  32. int num_ids;
  33. struct p_id_body *next;
  34. } p_id_body_t;
  35. int parse_pai_header(struct sip_msg* const msg);
  36. int parse_ppi_header(struct sip_msg* const msg);
  37. /*! casting macro for accessing P-Asserted-Identity body */
  38. #define get_pai(p_msg) ((p_id_body_t*)(p_msg)->pai->parsed)
  39. /*! casting macro for accessing P-Preferred-Identity body */
  40. #define get_ppi(p_msg) ((p_id_body_t*)(p_msg)->ppi->parsed)
  41. int free_pai_ppi_body(p_id_body_t *pid_b);
  42. #endif