tags.h File Reference

Tag handling functions To-tags consist of two parts: a fixed part which is bound to a server instance and variable part which is bound to a request. That helps to recognize, who generated the to-tag in loops through the same server, in such cases, the fixed part is constant, but the variable part varies because it depends on the via header. More...

#include "parser/msg_parser.h"
#include "globals.h"
#include "crc.h"
#include "str.h"
#include "socket_info.h"

Include dependency graph for tags.h:

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

Go to the source code of this file.

Defines

#define TOTAG_VALUE_LEN   (MD5_LEN+CRC16_LEN+1)

Functions

static void calc_crc_suffix (struct sip_msg *msg, char *tag_suffix)
 Generate variable part of To-tag for a request.
static void init_tags (char *tag, char **suffix, char *signature, char separator)
 Initialize To-tag value.


Detailed Description

Tag handling functions To-tags consist of two parts: a fixed part which is bound to a server instance and variable part which is bound to a request. That helps to recognize, who generated the to-tag in loops through the same server, in such cases, the fixed part is constant, but the variable part varies because it depends on the via header.

Definition in file tags.h.


Define Documentation

#define TOTAG_VALUE_LEN   (MD5_LEN+CRC16_LEN+1)

length of a To-tag, MD5 + CRC 16 + separator

Definition at line 49 of file tags.h.

Referenced by _reply(), new_dlg_uas(), and sl_filter_ACK().


Function Documentation

static void calc_crc_suffix ( struct sip_msg msg,
char *  tag_suffix 
) [inline, static]

Generate variable part of To-tag for a request.

Generate variable part of to-tag for a request, it will have the length of CRC16_LEN. A sufficiently long buffer must be passed to the function. This function avaluates the first VIA branch parameter for calculating the CRC array.

Parameters:
msg SIP message
tag_suffix suffix of the tag

Definition at line 62 of file tags.h.

References via_body::branch, crcitt_string_array(), via_body::host, via_body::port_str, via_param::value, and sip_msg::via1.

Referenced by _reply(), new_dlg_uas(), relay_reply(), sl_filter_ACK(), sl_get_reply_totag(), sl_send_reply_helper(), and t_get_reply_totag().

static void init_tags ( char *  tag,
char **  suffix,
char *  signature,
char  separator 
) [inline, static]

Initialize To-tag value.

Initialize To-tags, the tag will be generated from the MD5 hash of the signature, server address and port number.

Parameters:
tag initialized tag
suffix pointer to the suffix part
signature some unique string for initialisation
separator separator between prefix and suffix

Definition at line 87 of file tags.h.

References socket_info::address_str, get_first_socket(), _str::len, MD5_LEN, MD5StringArray(), socket_info::port_no_str, and _str::s.

Referenced by seas_init_tags(), sl_startup(), and tm_init_tags().


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