#include <stdlib.h>#include <string.h>#include "mf_funcs.h"#include "../../mem/mem.h"#include "../../ut.h"#include "../../data_lump.h"

Go to the source code of this file.
Defines | |
| #define | FETCH_MAXWD_VAL(_msg_) (((int)(long)(_msg_)->maxforwards->parsed)-1) |
| #define | IS_MAXWD_STORED(_msg_) ((_msg_)->maxforwards->parsed) |
| #define | MF_HDR "Max-Forwards: " |
| #define | MF_HDR_LEN (sizeof(MF_HDR) - 1) |
| #define | STORE_MAXWD_VAL(_msg_, _val_) (_msg_)->maxforwards->parsed = ((void*)(long)((_val_)+1)) |
Functions | |
| int | add_maxfwd_header (struct sip_msg *msg, unsigned int val) |
| static int | btostr (char *p, unsigned char val) |
| int | decrement_maxfwd (struct sip_msg *msg, int x, str *s) |
| int | is_maxfwd_present (struct sip_msg *msg, str *foo) |
| #define FETCH_MAXWD_VAL | ( | _msg_ | ) | (((int)(long)(_msg_)->maxforwards->parsed)-1) |
| #define IS_MAXWD_STORED | ( | _msg_ | ) | ((_msg_)->maxforwards->parsed) |
| #define MF_HDR "Max-Forwards: " |
| #define MF_HDR_LEN (sizeof(MF_HDR) - 1) |
| #define STORE_MAXWD_VAL | ( | _msg_, | |||
| _val_ | ) | (_msg_)->maxforwards->parsed = ((void*)(long)((_val_)+1)) |
Definition at line 48 of file mf_funcs.c.
Referenced by decrement_maxfwd(), and is_maxfwd_present().
| int add_maxfwd_header | ( | struct sip_msg * | msg, | |
| unsigned int | val | |||
| ) |
Definition at line 128 of file mf_funcs.c.
References anchor_lump(), btostr(), sip_msg::buf, buf, CRLF, CRLF_LEN, sip_msg::headers, insert_new_lump_before(), len, LM_ERR, MF_HDR, MF_HDR_LEN, hdr_field::name, pkg_free, pkg_malloc, and _str::s.
Referenced by w_process_maxfwd_header().
| static int btostr | ( | char * | p, | |
| unsigned char | val | |||
| ) | [inline, static] |
Definition at line 91 of file mf_funcs.c.
References _str::len, _str::s, and STORE_MAXWD_VAL.
Referenced by w_process_maxfwd_header().
Definition at line 55 of file mf_funcs.c.
References hdr_field::body, FETCH_MAXWD_VAL, HDR_MAXFORWARDS_F, IS_MAXWD_STORED, _str::len, LM_DBG, LM_ERR, sip_msg::maxforwards, parse_headers(), _str::s, STORE_MAXWD_VAL, str2s(), and trim_len.
Referenced by is_maxfwd_lt(), and w_process_maxfwd_header().
1.5.6