msg_translator.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*$Id$
  2. *
  3. *
  4. * Copyright (C) 2001-2003 Fhg Fokus
  5. *
  6. * This file is part of ser, a free SIP server.
  7. *
  8. * ser is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. * For a license to use the ser software under conditions
  14. * other than those described here, or to purchase support for this
  15. * software, please contact iptel.org by e-mail at the following addresses:
  16. * [email protected]
  17. *
  18. * ser 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  26. */
  27. #ifndef _MSG_TRANSLATOR_H
  28. #define _MSG_TRANSLATOR_H
  29. #define MY_HF_SEP ": "
  30. #define MY_HF_SEP_LEN 2
  31. #define BRANCH_SEPARATOR '.'
  32. #include "parser/msg_parser.h"
  33. #include "ip_addr.h"
  34. char * build_req_buf_from_sip_req ( struct sip_msg* msg,
  35. unsigned int *returned_len, struct socket_info* send_sock,
  36. int proto);
  37. char * build_res_buf_from_sip_res( struct sip_msg* msg,
  38. unsigned int *returned_len);
  39. char * build_res_buf_from_sip_req( unsigned int code ,
  40. char *text ,
  41. char *new_tag ,
  42. unsigned int new_tag_len ,
  43. struct sip_msg* msg,
  44. unsigned int *returned_len);
  45. char* via_builder( unsigned int *len,
  46. struct socket_info* send_sock,
  47. char *branch, int branch_len, int proto );
  48. #ifdef _OBSOLETED
  49. char* via_builder( struct sip_msg *msg ,
  50. unsigned int *len, struct socket_info* send_sock);
  51. #endif
  52. int branch_builder( unsigned int hash_index,
  53. /* only either parameter useful */
  54. unsigned int label, char * char_v,
  55. int branch,
  56. /* output value: string and actual length */
  57. char *branch_str, int *len );
  58. #endif