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


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. | |
Definition in file tags.h.
| #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().
| 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.
| 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.
| 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().
1.5.6