parse_rr.h File Reference

Route & Record-Route header field parser. More...

#include <stdio.h>
#include "msg_parser.h"
#include "parse_nameaddr.h"
#include "parse_param.h"
#include "hf.h"

Include dependency graph for parse_rr.h:

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

Go to the source code of this file.

Data Structures

struct  rr

Typedefs

typedef struct rr rr_t

Functions

int duplicate_rr (rr_t **_new, rr_t *_r, int _first)
void free_rr (rr_t **_r)
int get_path_dst_uri (str *_p, str *_dst)
int parse_rr (struct hdr_field *_r)
int parse_rr_body (char *buf, int len, rr_t **head)
void print_rr (FILE *_o, rr_t *_r)
int print_rr_body (struct hdr_field *iroute, str *oroute, int order, unsigned int *nb_recs)
int shm_duplicate_rr (rr_t **_new, rr_t *_r, int _first)
void shm_free_rr (rr_t **_r)


Detailed Description

Route & Record-Route header field parser.

Definition in file parse_rr.h.


Typedef Documentation

typedef struct rr rr_t

Structure representing a Route & Record-Route HF body


Function Documentation

int duplicate_rr ( rr_t **  _new,
rr_t _r,
int  first 
)

Duplicate a single (first) or the whole list of rr_t structure using pkg_malloc

Duplicate a single rr_t structure or the whole list (based on "first" param) using pkg_malloc

Definition at line 329 of file parse_rr.c.

References do_duplicate_rr().

void free_rr ( rr_t **  _r  ) 

Free list of rr in pkg_mem _c is head of the list

Free list of rrs in pkg_mem _r is head of the list

Definition at line 196 of file parse_rr.c.

References do_free_rr().

Referenced by build_path_vector(), clean_hdr_field(), do_duplicate_rr(), do_parse_rr_body(), extract_allowed_headers(), free_tm_dlg(), get_path_dst_uri(), recordroute_diff(), and send_subscribe().

int get_path_dst_uri ( str _p,
str _dst 
)

Function returns the first uri from Path without any duplication.

Path must be available. Function returns the first uri from Path without any duplication.

Definition at line 459 of file parse_rr.c.

References free_rr(), _str::len, LM_DBG, LM_ERR, rr::nameaddr, parse_rr_body(), _str::s, and name_addr::uri.

Referenced by lookup(), and nh_timer().

int parse_rr ( struct hdr_field _h  ) 

int parse_rr_body ( char *  buf,
int  len,
rr_t **  head 
)

Parse the body of Route & Record-Route headers

Wrapper to do_parse_rr_body() for external calls

Definition at line 142 of file parse_rr.c.

References do_parse_rr_body().

Referenced by build_dlg_t(), build_path_vector(), get_path_dst_uri(), pua_build_dlg_t(), and rls_notify_dlg().

void print_rr ( FILE *  _o,
rr_t _r 
)

Print list of rrs, just for debugging

Print list of RRs, just for debugging

Definition at line 216 of file parse_rr.c.

References rr::len, rr::nameaddr, rr::next, rr::params, print_nameaddr(), print_params(), and rr::r2.

Referenced by print_dlg().

int print_rr_body ( struct hdr_field iroute,
str oroute,
int  order,
unsigned int *  nb_recs 
)

print body for all RR headers in comma separated string

get first RR header and print comma separated bodies in oroute

  • order = 0 normal; order = 1 reverse
  • nb_recs - input=skip number of rr; output=number of printed rrs

Definition at line 350 of file parse_rr.c.

References to_body::error, len, rr::len, _str::len, LM_DBG, LM_ERR, MAX_RR_HDRS, name_addr::name, rr::nameaddr, rr::next, NULL, parse_rr(), hdr_field::parsed, pkg_malloc, s, _str::s, and hdr_field::sibling.

Referenced by extract_sdialog_info(), populate_leg_info(), and subs_cback_func().

int shm_duplicate_rr ( rr_t **  _new,
rr_t _r,
int  first 
)

Duplicate a single (first) or the whole list of rr_t structure using shm_malloc

Duplicate a single rr_t structure or the whole list (based on "first" param) using shm_malloc

Definition at line 339 of file parse_rr.c.

References do_duplicate_rr().

Referenced by get_route_set().

void shm_free_rr ( rr_t **  _r  ) 

Free list of rr in shm_mem _c is head of the list

Free list of rrs in shm_mem _r is head of the list

Definition at line 207 of file parse_rr.c.

References do_free_rr().

Referenced by do_duplicate_rr(), free_dlg(), and get_route_set().


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