data_lump.h File Reference

adding/removing headers or any other data chunk from a message More...

#include "lump_struct.h"
#include "parser/msg_parser.h"
#include "parser/hf.h"

Include dependency graph for data_lump.h:

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

Go to the source code of this file.

Defines

#define reset_init_lump_flags()
#define set_init_lump_flags(_flags)

Functions

struct lumpanchor_lump (struct sip_msg *msg, unsigned int offset, unsigned int len, enum _hdr_types_t type)
 set an anchor
struct lumpappend_new_lump (struct lump **list, char *new_hdr, unsigned int len, enum _hdr_types_t type)
 adds a header to the end
void del_flaged_lumps (struct lump **lump_list, const enum lump_flag flags)
 remove all flagged lumps from the list
struct lumpdel_lump (struct sip_msg *msg, unsigned int offset, unsigned int len, enum _hdr_types_t type)
 removes an already existing header
void del_notflaged_lumps (struct lump **lump_list, const enum lump_flag not_flags)
 remove all unflagged lumps from the list
struct lumpdup_lump_list (struct lump *l)
 duplicates a lump list shallowly in pkg-mem
void free_duped_lump_list (struct lump *l)
 frees a shallowly duplicated lump list
struct lumpinsert_cond_lump_after (struct lump *after, enum lump_conditions c, enum _hdr_types_t type)
 conditional lumps - insert
struct lumpinsert_cond_lump_before (struct lump *after, enum lump_conditions c, enum _hdr_types_t type)
 conditional lumps - before
struct lumpinsert_new_lump (struct lump **list, char *new_hdr, unsigned int len, enum _hdr_types_t type)
 inserts a header to the beginning
struct lumpinsert_new_lump_after (struct lump *after, char *new_hdr, unsigned int len, enum _hdr_types_t type)
 inserts a header to the beginning - after
struct lumpinsert_new_lump_before (struct lump *before, char *new_hdr, unsigned int len, enum _hdr_types_t type)
 inserts a header to the beginning - before
struct lumpinsert_subst_lump_after (struct lump *after, enum lump_subst subst, enum _hdr_types_t type)
 substitutions (replace with ip address, port etc) - after
struct lumpinsert_subst_lump_before (struct lump *before, enum lump_subst subst, enum _hdr_types_t type)
 substitutions (replace with ip address, port etc) - before

Variables

int init_lump_flags


Detailed Description

adding/removing headers or any other data chunk from a message

Definition in file data_lump.h.


Define Documentation

 
#define reset_init_lump_flags (  ) 

Value:

do{\
      init_lump_flags = 0;\
   }while(0)

Definition at line 55 of file data_lump.h.

Referenced by post_print_uac_request().

#define set_init_lump_flags ( _flags   ) 

Value:

do{\
      init_lump_flags = _flags;\
   }while(0)

Definition at line 50 of file data_lump.h.

Referenced by pre_print_uac_request().


Function Documentation

struct lump* anchor_lump ( struct sip_msg msg,
unsigned int  offset,
unsigned int  len,
enum _hdr_types_t  type 
) [read]

set an anchor

struct lump* append_new_lump ( struct lump **  list,
char *  new_hdr,
unsigned int  len,
enum _hdr_types_t  type 
) [read]

adds a header to the end

Returns:
returns pointer on success, 0 on error

Definition at line 62 of file data_lump.c.

References lump::flags, init_lump_flags, lump::len, LM_ERR, LUMP_ADD, lump::op, pkg_malloc, lump::type, lump::u, and lump::value.

void del_flaged_lumps ( struct lump **  lump_list,
const enum lump_flag  flags 
)

remove all flagged lumps from the list

remove all flagged lumps from the list

Parameters:
lump_list list of lumps
flags flags for lumps that should be deleted

Definition at line 635 of file data_lump.c.

References compare_flaged_lumps(), and del_flaged_lumps_helper().

Referenced by post_print_uac_request().

struct lump* del_lump ( struct sip_msg msg,
unsigned int  offset,
unsigned int  len,
enum _hdr_types_t  type 
) [read]

void del_notflaged_lumps ( struct lump **  lump_list,
const enum lump_flag  not_flags 
)

remove all unflagged lumps from the list

remove all unflagged lumps from the list

Parameters:
lump_list list of lumps
not_flags flags for lumps that should not deleted

Definition at line 646 of file data_lump.c.

References compare_not_flaged_lumps(), and del_flaged_lumps_helper().

Referenced by free_faked_req().

struct lump* dup_lump_list ( struct lump l  )  [read]

duplicates a lump list shallowly in pkg-mem

duplicates a lump list shallowly in pkg-mem

Returns:
if either original list empty or error occur returns, 0 is returned, pointer to the copy otherwise

Definition at line 511 of file data_lump.c.

References dup_lump_list_r(), and LD_NEXT.

void free_duped_lump_list ( struct lump l  ) 

frees a shallowly duplicated lump list

Definition at line 523 of file data_lump.c.

References lump::after, lump::before, lump::flags, free_lump(), LUMPFLAG_DUPED, lump::next, and pkg_free.

struct lump* insert_cond_lump_after ( struct lump after,
enum lump_conditions  c,
enum _hdr_types_t  type 
) [read]

conditional lumps - insert

conditional lumps - insert

Returns:
returns pointer on success, 0 on error

Definition at line 220 of file data_lump.c.

References lump::after, lump::cond, E_OUT_OF_MEM, lump::flags, init_lump_flags, lump::len, LM_ERR, LUMP_ADD_OPT, lump::op, pkg_malloc, ser_error, lump::type, and lump::u.

Referenced by build_rr(), and record_route().

struct lump* insert_cond_lump_before ( struct lump before,
enum lump_conditions  c,
enum _hdr_types_t  type 
) [read]

conditional lumps - before

conditional lumps - before

Returns:
returns pointer on success, 0 on error

Definition at line 246 of file data_lump.c.

References lump::before, lump::cond, E_OUT_OF_MEM, lump::flags, init_lump_flags, lump::len, LM_ERR, LUMP_ADD_OPT, lump::op, pkg_malloc, ser_error, lump::type, and lump::u.

Referenced by record_route().

struct lump* insert_new_lump ( struct lump **  list,
char *  new_hdr,
unsigned int  len,
enum _hdr_types_t  type 
) [read]

inserts a header to the beginning

Returns:
returns pointer if success, 0 on error

Definition at line 90 of file data_lump.c.

References lump::flags, init_lump_flags, lump::len, LM_ERR, LUMP_ADD, lump::next, lump::op, pkg_malloc, lump::type, lump::u, and lump::value.

struct lump* insert_new_lump_after ( struct lump after,
char *  new_hdr,
unsigned int  len,
enum _hdr_types_t  type 
) [read]

struct lump* insert_new_lump_before ( struct lump before,
char *  new_hdr,
unsigned int  len,
enum _hdr_types_t  type 
) [read]

struct lump* insert_subst_lump_after ( struct lump after,
enum lump_subst  subst,
enum _hdr_types_t  type 
) [read]

substitutions (replace with ip address, port etc) - after

substitutions (replace with ip address, port etc) - after

Returns:
returns pointer on success, 0 on error

Definition at line 167 of file data_lump.c.

References lump::after, E_OUT_OF_MEM, lump::flags, init_lump_flags, lump::len, LM_ERR, LUMP_ADD_SUBST, lump::op, pkg_malloc, ser_error, lump::subst, lump::type, and lump::u.

Referenced by build_rr().

struct lump* insert_subst_lump_before ( struct lump before,
enum lump_subst  subst,
enum _hdr_types_t  type 
) [read]

substitutions (replace with ip address, port etc) - before

substitutions (replace with ip address, port etc) - before

Returns:
returns pointer on success, 0 on error

Definition at line 193 of file data_lump.c.

References lump::before, E_OUT_OF_MEM, lump::flags, init_lump_flags, lump::len, LM_ERR, LUMP_ADD_SUBST, lump::op, pkg_malloc, ser_error, lump::subst, lump::type, and lump::u.

Referenced by prepend_path().


Variable Documentation


Generated on Mon May 21 18:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6