mf_funcs.c File Reference

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

Include dependency graph for mf_funcs.c:

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 Documentation

#define FETCH_MAXWD_VAL ( _msg_   )     (((int)(long)(_msg_)->maxforwards->parsed)-1)

Definition at line 50 of file mf_funcs.c.

Referenced by is_maxfwd_present().

#define IS_MAXWD_STORED ( _msg_   )     ((_msg_)->maxforwards->parsed)

Definition at line 46 of file mf_funcs.c.

Referenced by is_maxfwd_present().

#define MF_HDR   "Max-Forwards: "

Definition at line 40 of file mf_funcs.c.

Referenced by add_maxfwd_header().

#define MF_HDR_LEN   (sizeof(MF_HDR) - 1)

Definition at line 41 of file mf_funcs.c.

Referenced by add_maxfwd_header().

#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().


Function Documentation

int add_maxfwd_header ( struct sip_msg msg,
unsigned int  val 
)

static int btostr ( char *  p,
unsigned char  val 
) [inline, static]

Definition at line 115 of file mf_funcs.c.

Referenced by add_maxfwd_header().

int decrement_maxfwd ( struct sip_msg msg,
int  x,
str s 
)

Definition at line 91 of file mf_funcs.c.

References _str::len, _str::s, and STORE_MAXWD_VAL.

Referenced by w_process_maxfwd_header().

int is_maxfwd_present ( struct sip_msg msg,
str foo 
)


Generated on Wed May 23 20:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6