data_lump_rpl.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (C) 2001-2003 FhG Fokus
  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. */
  21. /*!
  22. * \file
  23. * \brief Kamailio core :: Data lumps
  24. * \author bogdan, andrei
  25. * \ingroup core
  26. * Module: \ref core
  27. */
  28. #ifndef data_lump_rpl_h
  29. #define data_lump_rpl_h
  30. #include "parser/msg_parser.h"
  31. #define LUMP_RPL_HDR (1<<1)
  32. #define LUMP_RPL_BODY (1<<2)
  33. #define LUMP_RPL_NODUP (1<<3)
  34. #define LUMP_RPL_NOFREE (1<<4)
  35. #define LUMP_RPL_SHMEM (1<<5)
  36. struct lump_rpl
  37. {
  38. str text;
  39. int flags;
  40. struct lump_rpl* next;
  41. };
  42. struct lump_rpl** add_lump_rpl2(struct sip_msg *, char *, int , int );
  43. /*! \brief compatibility wrapper for the old add_lump_rpl version */
  44. inline static struct lump_rpl* add_lump_rpl(struct sip_msg* msg,
  45. char* s, int len , int flags )
  46. {
  47. struct lump_rpl** l;
  48. l=add_lump_rpl2(msg, s, len, flags);
  49. return l?(*l):0;
  50. }
  51. void free_lump_rpl(struct lump_rpl* );
  52. void unlink_lump_rpl(struct sip_msg *, struct lump_rpl* );
  53. void del_nonshm_lump_rpl( struct lump_rpl ** );
  54. #endif