nhelpr_funcs.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include "nhelpr_funcs.h"
#include "../../dprint.h"
#include "../../config.h"
#include "../../ut.h"
#include "../../forward.h"
#include "../../resolve.h"
#include "../../globals.h"
#include "../../udp_server.h"
#include "../../pt.h"
#include "../../parser/msg_parser.h"
#include "../../trim.h"
#include "../../parser/parse_from.h"
#include "../../parser/contact/parse_contact.h"
#include "../../parser/parse_uri.h"
#include "../../parser/parse_content.h"

Include dependency graph for nhelpr_funcs.c:

Go to the source code of this file.

Defines

#define advance(_ptr, _n, _str, _error)
#define one_of_16(_x, _t)
#define one_of_8(_x, _t)
#define READ(val)   (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) << 24))

Functions

int check_content_type (struct sip_msg *msg)
int extract_body (struct sip_msg *msg, str *body)
int get_callid (struct sip_msg *_m, str *_cid)
int get_contact_uri (struct sip_msg *_m, struct sip_uri *uri, contact_t **_c)
int get_from_tag (struct sip_msg *_m, str *_tag)
int get_to_tag (struct sip_msg *_m, str *_tag)
void * ser_memmem (const void *b1, const void *b2, size_t len1, size_t len2)


Define Documentation

#define advance ( _ptr,
_n,
_str,
_error   ) 

Value:

do{\
      if ((_ptr)+(_n)>(_str).s+(_str).len)\
         goto _error;\
      (_ptr) = (_ptr) + (_n);\
   }while(0);

Definition at line 52 of file nhelpr_funcs.c.

Referenced by check_content_type().

#define one_of_16 ( _x,
_t   ) 

Value:

(_x==_t[0]||_x==_t[15]||_x==_t[8]||_x==_t[2]||_x==_t[3]||_x==_t[4]\
   ||_x==_t[5]||_x==_t[6]||_x==_t[7]||_x==_t[1]||_x==_t[9]||_x==_t[10]\
   ||_x==_t[11]||_x==_t[12]||_x==_t[13]||_x==_t[14])

Definition at line 58 of file nhelpr_funcs.c.

Referenced by check_content_type().

#define one_of_8 ( _x,
_t   ) 

Value:

(_x==_t[0]||_x==_t[7]||_x==_t[1]||_x==_t[2]||_x==_t[3]||_x==_t[4]\
   ||_x==_t[5]||_x==_t[6])

Definition at line 62 of file nhelpr_funcs.c.

Referenced by check_content_type().

#define READ ( val   )     (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) << 24))


Function Documentation

int check_content_type ( struct sip_msg msg  ) 

int extract_body ( struct sip_msg msg,
str body 
)

int get_callid ( struct sip_msg _m,
str _cid 
)

int get_contact_uri ( struct sip_msg _m,
struct sip_uri uri,
contact_t **  _c 
)

int get_from_tag ( struct sip_msg _m,
str _tag 
)

Definition at line 296 of file nhelpr_funcs.c.

References get_from, _str::len, LM_ERR, NULL, parse_from_header(), and _str::s.

int get_to_tag ( struct sip_msg _m,
str _tag 
)

Definition at line 273 of file nhelpr_funcs.c.

References get_to, _str::len, LM_ERR, NULL, _str::s, and sip_msg::to.

void* ser_memmem ( const void *  b1,
const void *  b2,
size_t  len1,
size_t  len2 
)

Definition at line 211 of file nhelpr_funcs.c.

References NULL.

Referenced by extract_mediainfo(), extract_mediaip(), extract_rtcp(), find_sdp_line(), and force_rtp_proxy().


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