msg_translator.h File Reference

Create and translate SIP messages/ message contents More...

#include "parser/msg_parser.h"
#include "ip_addr.h"

Include dependency graph for msg_translator.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bookmark
 point to some remarkable positions in a SIP message More...
struct  hostport
 used by via_builder() More...

Defines

#define BRANCH_SEPARATOR   '.'
#define MSG_TRANS_NOVIA_FLAG   (1<<1)
#define MSG_TRANS_SHM_FLAG   (1<<0)
#define MY_HF_SEP   ": "
#define MY_HF_SEP_LEN   2
#define set_hostport(hp, msg)
#define WARNING   "Warning: 392 "
#define WARNING_LEN   (sizeof(WARNING)-1)
#define WARNING_PHRASE   " \"Noisy feedback tells: "
#define WARNING_PHRASE_LEN   (sizeof(WARNING_PHRASE)-1)

Functions

int branch_builder (unsigned int hash_index, unsigned int label, char *char_v, int branch, char *branch_str, int *len)
 return number of chars printed or 0 if space exceeded; assumes buffer size of at least MAX_BRANCH_PARAM_LEN
char * build_req_buf_from_sip_req (struct sip_msg *msg, unsigned int *returned_len, struct socket_info *send_sock, int proto, unsigned int flags)
char * build_res_buf_from_sip_req (unsigned int code, str *text, str *new_tag, struct sip_msg *msg, unsigned int *returned_len, struct bookmark *bmark)
char * build_res_buf_from_sip_res (struct sip_msg *msg, unsigned int *returned_len)
int received_test (struct sip_msg *msg)
 check if IP address in Via != source IP address of signaling
char * via_builder (unsigned int *len, struct socket_info *send_sock, str *branch, str *extra_params, int proto, struct hostport *hp)


Detailed Description

Create and translate SIP messages/ message contents

Definition in file msg_translator.h.


Define Documentation

#define BRANCH_SEPARATOR   '.'

Definition at line 42 of file msg_translator.h.

Referenced by branch_builder(), and t_reply_matching().

#define MSG_TRANS_NOVIA_FLAG   (1<<1)

Definition at line 49 of file msg_translator.h.

Referenced by build_req_buf_from_sip_req(), and t_uac().

#define MSG_TRANS_SHM_FLAG   (1<<0)

Definition at line 48 of file msg_translator.h.

Referenced by build_req_buf_from_sip_req(), print_uac_request(), and t_uac().

#define MY_HF_SEP   ": "

Definition at line 39 of file msg_translator.h.

#define MY_HF_SEP_LEN   2

Definition at line 40 of file msg_translator.h.

#define set_hostport ( hp,
msg   ) 

#define WARNING   "Warning: 392 "

Definition at line 43 of file msg_translator.h.

Referenced by warning_builder().

#define WARNING_LEN   (sizeof(WARNING)-1)

Definition at line 44 of file msg_translator.h.

Referenced by warning_builder().

#define WARNING_PHRASE   " \"Noisy feedback tells: "

Definition at line 45 of file msg_translator.h.

Referenced by warning_builder().

#define WARNING_PHRASE_LEN   (sizeof(WARNING_PHRASE)-1)

Definition at line 46 of file msg_translator.h.

Referenced by warning_builder().


Function Documentation

int branch_builder ( unsigned int  hash_index,
unsigned int  label,
char *  char_v,
int  branch,
char *  branch_str,
int *  len 
)

return number of chars printed or 0 if space exceeded; assumes buffer size of at least MAX_BRANCH_PARAM_LEN

Definition at line 1855 of file msg_translator.c.

References BRANCH_SEPARATOR, int2reverse_hex(), MAX_BRANCH_PARAM_LEN, MCOOKIE, MCOOKIE_LEN, and MD5_LEN.

Referenced by t_calc_branch().

char* build_req_buf_from_sip_req ( struct sip_msg msg,
unsigned int *  returned_len,
struct socket_info send_sock,
int  proto,
unsigned int  flags 
)

char* build_res_buf_from_sip_req ( unsigned int  code,
str text,
str new_tag,
struct sip_msg msg,
unsigned int *  returned_len,
struct bookmark bmark 
)

char* build_res_buf_from_sip_res ( struct sip_msg msg,
unsigned int *  returned_len 
)

int received_test ( struct sip_msg msg  ) 

char* via_builder ( unsigned int *  len,
struct socket_info send_sock,
str branch,
str extra_params,
int  proto,
struct hostport hp 
)


Generated on Wed May 23 20:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6