bec3785237fa52f1f13b69673545a5e9c69e0943
[sip-router] / msg_translator.h
1 /*$Id$
2  * 
3  */
4
5 #ifndef  _MSG_TRANSLATOR_H
6 #define _MSG_TRANSLATOR_H
7
8 #define MY_HF_SEP ": "
9 #define MY_HF_SEP_LEN 2
10
11 #define BRANCH_SEPARATOR '.'
12
13 #include "parser/msg_parser.h"
14 #include "ip_addr.h"
15
16 char * build_req_buf_from_sip_req (     struct sip_msg* msg, 
17                                 unsigned int *returned_len, struct socket_info* send_sock);
18
19 char * build_res_buf_from_sip_res(      struct sip_msg* msg,
20                                 unsigned int *returned_len);
21
22 char * build_res_buf_from_sip_req(      unsigned int code ,
23                                 char *text ,
24                                 char *new_tag ,
25                                 unsigned int new_tag_len ,
26                                 struct sip_msg* msg,
27                                 unsigned int *returned_len);
28
29 char* via_builder( unsigned int *len,
30         struct socket_info* send_sock,
31         char *branch, int branch_len );
32
33 #ifdef _OBSOLETED
34 char* via_builder( struct sip_msg *msg ,
35                                 unsigned int *len, struct socket_info* send_sock);
36 #endif
37
38 int branch_builder( unsigned int hash_index, 
39         /* only either parameter useful */
40         unsigned int label, char * char_v,
41         int branch,
42         /* output value: string and actual length */
43         char *branch_str, int *len );
44
45
46 #endif