tm/sip_msg.c File Reference

TM :: SIP message handling. More...

#include <stdio.h>
#include "sip_msg.h"
#include "../../dprint.h"
#include "../../mem/mem.h"
#include "../../data_lump.h"
#include "../../data_lump_rpl.h"
#include "../../ut.h"
#include "../../parser/digest/digest.h"

Include dependency graph for tm/sip_msg.c:

Go to the source code of this file.

Defines

#define AUTH_BODY_SIZE   sizeof(struct auth_body)
#define CLONE_LUMP_LIST(anchor, list)
#define HOOK_NOT_SET(hook)   (new_msg->hook == org_msg->hook)
#define LINK_SIBLING_HEADER(_hook, _hdr)
#define lump_clone(_new, _old, _ptr)
#define lump_len(_lump)
#define LUMP_LIST_LEN(len, list)
#define ROUND4(s)   (((s)+(sizeof(char*)-1))&(~(sizeof(char*)-1)))

Functions

static struct auth_bodyauth_body_cloner (char *new_buf, char *org_buf, struct auth_body *auth, char **p)
static int clone_authorized_hooks (struct sip_msg *new, struct sip_msg *old)
struct sip_msgsip_msg_cloner (struct sip_msg *org_msg, int *sip_msg_len)
static void uri_trans (char *new_buf, char *org_buf, struct sip_uri *uri)
static struct via_bodyvia_body_cloner (char *new_buf, char *org_buf, struct via_body *param_org_via, char **p)


Detailed Description

TM :: SIP message handling.

Definition in file tm/sip_msg.c.


Define Documentation

#define AUTH_BODY_SIZE   sizeof(struct auth_body)

Definition at line 302 of file tm/sip_msg.c.

Referenced by sip_msg_cloner().

#define CLONE_LUMP_LIST ( anchor,
list   ) 

Referenced by sip_msg_cloner().

#define HOOK_NOT_SET ( hook   )     (new_msg->hook == org_msg->hook)

Definition at line 304 of file tm/sip_msg.c.

Referenced by sip_msg_cloner().

#define LINK_SIBLING_HEADER ( _hook,
_hdr   ) 

Value:

do { \
      struct hdr_field *_itr; \
      for (_itr=new_msg->_hook; _itr->sibling; _itr=_itr->sibling); \
      _itr->sibling = _hdr; \
   } while(0)

Definition at line 307 of file tm/sip_msg.c.

Referenced by sip_msg_cloner().

#define lump_clone ( _new,
_old,
_ptr   ) 

Definition at line 76 of file tm/sip_msg.c.

#define lump_len ( _lump   ) 

Value:

(ROUND4(sizeof(struct lump)) +\
   ROUND4(((_lump)->op==LUMP_ADD)?(_lump)->len:0))

Definition at line 73 of file tm/sip_msg.c.

#define LUMP_LIST_LEN ( len,
list   ) 

Referenced by sip_msg_cloner().

#define ROUND4 ( s   )     (((s)+(sizeof(char*)-1))&(~(sizeof(char*)-1)))

Definition at line 70 of file tm/sip_msg.c.

Referenced by auth_body_cloner(), sip_msg_cloner(), and via_body_cloner().


Function Documentation

static struct auth_body* auth_body_cloner ( char *  new_buf,
char *  org_buf,
struct auth_body auth,
char **  p 
) [static, read]

static int clone_authorized_hooks ( struct sip_msg new,
struct sip_msg old 
) [inline, static]

struct sip_msg* sip_msg_cloner ( struct sip_msg org_msg,
int *  sip_msg_len 
) [read]

Definition at line 315 of file tm/sip_msg.c.

References sip_msg::accept, sip_msg::accept_disposition, sip_msg::accept_language, sip_msg::add_rm, sip_msg::allow, allow, auth_body_cloner(), AUTH_BODY_SIZE, sip_msg::authorization, hdr_field::body, sip_msg::body_lumps, sip_msg::buf, sip_msg::callid, clone_authorized_hooks(), CLONE_LUMP_LIST, sip_msg::contact, sip_msg::content_disposition, sip_msg::content_length, sip_msg::content_type, sip_msg::cseq, sip_msg::diversion, sip_msg::dst_uri, sip_msg::eoh, sip_msg::event, sip_msg::expires, sip_msg::first_line, FL_SHM_CLONE, lump_rpl::flags, sip_msg::from, sip_msg::h_via1, sip_msg::h_via2, HDR_ACCEPT_T, HDR_ACCEPTDISPOSITION_T, HDR_ACCEPTLANGUAGE_T, HDR_ALLOW_T, HDR_AUTHORIZATION_T, HDR_CALLID_T, HDR_CONTACT_T, HDR_CONTENTDISPOSITION_T, HDR_CONTENTLENGTH_T, HDR_CONTENTTYPE_T, HDR_CSEQ_T, HDR_DIVERSION_T, HDR_EVENT_T, HDR_EXPIRES_T, HDR_FROM_T, HDR_MAXFORWARDS_T, HDR_MIN_SE_T, HDR_ORGANIZATION_T, HDR_PAI_T, HDR_PATH_T, HDR_PPI_T, HDR_PRIORITY_T, HDR_PRIVACY_T, HDR_PROXYAUTH_T, HDR_PROXYREQUIRE_T, HDR_RECORDROUTE_T, HDR_REFER_TO_T, HDR_RETRY_AFTER_T, HDR_ROUTE_T, HDR_RPID_T, HDR_SESSION_EXPIRES_T, HDR_SUBJECT_T, HDR_SUPPORTED_T, HDR_TO_T, HDR_UNSUPPORTED_T, HDR_USERAGENT_T, HDR_VIA_T, sip_msg::headers, HOOK_NOT_SET, sip_msg::last_header, to_body::last_param, _str::len, sip_msg::len, len, LINK_SIBLING_HEADER, LM_ERR, LM_WARN, LUMP_LIST_LEN, LUMP_RPL_NODUP, LUMP_RPL_NOFREE, LUMP_RPL_SHMEM, sip_msg::maxforwards, sip_msg::min_se, sip_msg::msg_flags, to_param::name, hdr_field::name, sip_msg::new_uri, lump_rpl::next, to_param::next, via_param::next, via_body::next, hdr_field::next, sip_msg::organization, sip_msg::pai, to_body::param_lst, via_body::param_lst, hdr_field::parsed, sip_msg::parsed_orig_ruri, sip_msg::parsed_orig_ruri_ok, sip_msg::parsed_uri, sip_msg::parsed_uri_ok, sip_msg::path, sip_msg::path_vec, sip_msg::ppi, sip_msg::priority, priority, sip_msg::privacy, sip_msg::proxy_auth, sip_msg::proxy_require, sip_msg::record_route, record_route(), sip_msg::refer_to, msg_start::reply, sip_msg::reply_lump, msg_start::request, ROUND4, sip_msg::route, sip_msg::rpid, _str::s, sip_msg::sdp, sip_msg::session_expires, shm_free, shm_malloc(), hdr_field::sibling, SIP_REPLY, SIP_REQUEST, sip_msg::subject, sip_msg::supported, lump_rpl::text, sip_msg::to, translate_pointer, msg_start::type, hdr_field::type, msg_start::u, sip_msg::unparsed, sip_msg::unsupported, uri_trans(), sip_msg::user_agent, to_param::value, sip_msg::via1, sip_msg::via2, and via_body_cloner().

Referenced by build_cell(), and store_reply().

static void uri_trans ( char *  new_buf,
char *  org_buf,
struct sip_uri uri 
) [static]

static struct via_body* via_body_cloner ( char *  new_buf,
char *  org_buf,
struct via_body param_org_via,
char **  p 
) [static, read]


Generated on Thu May 24 20:00:43 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6