dset.h File Reference

Destination set handling functions. More...

#include "ip_addr.h"
#include "qvalue.h"

Include dependency graph for dset.h:

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

Go to the source code of this file.

Functions

int append_branch (struct sip_msg *msg, str *uri, str *dst_uri, str *path, qvalue_t q, unsigned int flags, struct socket_info *force_socket)
 Add a new branch to current transaction.
int branch_uri2dset (str *new_uri)
 moves the uri to destination for all branches and all uris are set to given uri
void clear_branches (void)
 Empty the array of branches.
char * get_branch (unsigned int idx, int *len, qvalue_t *q, str *dst_uri, str *path, unsigned int *flags, struct socket_info **force_socket)
 Get the next branch in the current transaction.
int get_request_uri (struct sip_msg *_m, str *_u)
 Get actual Request-URI.
qvalue_t get_ruri_q (void)
 Get the q value of the Request-URI.
unsigned int getb0flags (void)
 Get/set the per branch flags for the RURI (branch 0).
int isbflagset (unsigned int b_idx, unsigned int mask)
 Test the per branch flag.
char * print_dset (struct sip_msg *msg, int *len)
 Create a Contact header field from the list of current branches.
int resetbflag (unsigned int b_idx, unsigned int mask)
 Reset the per branch flag.
int rewrite_uri (struct sip_msg *_m, str *_s)
 Rewrite Request-URI.
void set_ruri_q (qvalue_t q)
 Set the q value of the Request-URI.
unsigned int setb0flags (unsigned int flags)
int setbflag (unsigned int b_idx, unsigned int mask)
 Set the per branch flag.

Variables

unsigned int nr_branches


Detailed Description

Destination set handling functions.

Definition in file dset.h.


Function Documentation

int append_branch ( struct sip_msg msg,
str uri,
str dst_uri,
str path,
qvalue_t  q,
unsigned int  flags,
struct socket_info force_socket 
)

int branch_uri2dset ( str new_uri  ) 

moves the uri to destination for all branches and all uris are set to given uri

Definition at line 494 of file dset.c.

References branches, branch::dst_uri, branch::dst_uri_len, branch::len, len, _str::len, LM_ERR, MAX_URI_SIZE, nr_branches, _str::s, and branch::uri.

Referenced by t_replicate().

void clear_branches ( void   ) 

Empty the array of branches.

Definition at line 246 of file dset.c.

References nr_branches, Q_UNSPECIFIED, ruri_bflags, and ruri_q.

Referenced by faked_msg_next(), receive_msg(), t_forward_nonack(), and t_load_contacts().

char* get_branch ( unsigned int  idx,
int *  len,
qvalue_t q,
str dst_uri,
str path,
unsigned int *  flags,
struct socket_info **  force_socket 
)

Get the next branch in the current transaction.

Get the next branch in the current transaction.

Returns:
Return the next branch from the dset array, 0 is returned if there are no more branches

Definition at line 208 of file dset.c.

References branches, branch::dst_uri_len, branch::flags, branch::force_send_socket, _str::len, branch::len, nr_branches, branch::path_len, branch::q, Q_UNSPECIFIED, _str::s, and branch::uri.

Referenced by check_routing(), is_uri_host_local(), print_dset(), t_forward_nonack(), and t_load_contacts().

int get_request_uri ( struct sip_msg _m,
str _u 
)

Get actual Request-URI.

Definition at line 448 of file dset.c.

References sip_msg::first_line, _str::len, sip_msg::new_uri, msg_start::request, _str::s, and msg_start::u.

qvalue_t get_ruri_q ( void   ) 

Get the q value of the Request-URI.

Definition at line 438 of file dset.c.

References ruri_q.

Referenced by t_load_contacts().

unsigned int getb0flags ( void   ) 

Get/set the per branch flags for the RURI (branch 0).

Definition at line 108 of file dset.c.

References ruri_bflags.

Referenced by add_uac(), do_action(), pack_ci(), reply_received(), t_forward_nonack(), and t_load_contacts().

int isbflagset ( unsigned int  b_idx,
unsigned int  mask 
)

Test the per branch flag.

Definition at line 137 of file dset.c.

References get_ptr_bflags().

Referenced by do_action().

char* print_dset ( struct sip_msg msg,
int *  len 
)

Create a Contact header field from the list of current branches.

Definition at line 338 of file dset.c.

References CONTACT, CONTACT_DELIM, CONTACT_DELIM_LEN, CONTACT_LEN, CRLF, CRLF_LEN, get_branch(), _str::len, len_q(), LM_ERR, MAX_REDIRECTION_LEN, sip_msg::new_uri, branch::q, q2str(), Q_PARAM, Q_PARAM_LEN, Q_UNSPECIFIED, ruri_q, _str::s, and branch::uri.

Referenced by _reply(), and sl_send_reply_helper().

int resetbflag ( unsigned int  b_idx,
unsigned int  mask 
)

Reset the per branch flag.

Definition at line 152 of file dset.c.

References get_ptr_bflags().

Referenced by do_action().

int rewrite_uri ( struct sip_msg _m,
str _s 
)

void set_ruri_q ( qvalue_t  q  ) 

Set the q value of the Request-URI.

Definition at line 429 of file dset.c.

References ruri_q.

Referenced by do_query(), enum_pv_query_3(), and lookup().

unsigned int setb0flags ( unsigned int  flags  ) 

Definition at line 114 of file dset.c.

References ruri_bflags.

Referenced by do_action(), fake_req(), reply_received(), t_forward_nonack(), and t_next_contacts().

int setbflag ( unsigned int  b_idx,
unsigned int  mask 
)

Set the per branch flag.

Definition at line 121 of file dset.c.

References get_ptr_bflags().

Referenced by cpl_proxy_to_loc_set(), do_action(), and lookup().


Variable Documentation

unsigned int nr_branches

how many of them we have

Definition at line 80 of file dset.c.

Referenced by append_branch(), branch_uri2dset(), clear_branches(), get_branch(), get_ptr_bflags(), and t_load_contacts().


Generated on Tue May 22 16:00:39 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6