hf.h File Reference

Defines for SIP header types. More...

#include "../str.h"

Include dependency graph for hf.h:

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

Go to the source code of this file.

Data Structures

struct  hdr_field

Defines

#define HDR_ACCEPT_F   HDR_F_DEF(ACCEPT)
#define HDR_ACCEPTDISPOSITION_F   HDR_F_DEF(ACCEPTDISPOSITION)
#define HDR_ACCEPTLANGUAGE_F   HDR_F_DEF(ACCEPTLANGUAGE)
#define HDR_ALLOW_F   HDR_F_DEF(ALLOW)
#define HDR_AUTHORIZATION_F   HDR_F_DEF(AUTHORIZATION)
#define HDR_CALLID_F   HDR_F_DEF(CALLID)
#define HDR_CONTACT_F   HDR_F_DEF(CONTACT)
#define HDR_CONTENTDISPOSITION_F   HDR_F_DEF(CONTENTDISPOSITION)
#define HDR_CONTENTLENGTH_F   HDR_F_DEF(CONTENTLENGTH)
#define HDR_CONTENTTYPE_F   HDR_F_DEF(CONTENTTYPE)
#define HDR_CSEQ_F   HDR_F_DEF(CSEQ)
#define HDR_DIVERSION_F   HDR_F_DEF(DIVERSION)
#define HDR_EOH_F   HDR_F_DEF(EOH)
#define HDR_EVENT_F   HDR_F_DEF(EVENT)
#define HDR_EXPIRES_F   HDR_F_DEF(EXPIRES)
#define HDR_F_DEF(name)   HDR_T2F(HDR_##name##_T)
#define HDR_FROM_F   HDR_F_DEF(FROM)
#define HDR_MAXFORWARDS_F   HDR_F_DEF(MAXFORWARDS)
#define HDR_MIN_SE_F   HDR_F_DEF(MIN_SE)
#define HDR_ORGANIZATION_F   HDR_F_DEF(ORGANIZATION)
#define HDR_OTHER_F   HDR_F_DEF(OTHER)
#define HDR_PAI_F   HDR_F_DEF(PAI)
#define HDR_PATH_F   HDR_F_DEF(PATH)
#define HDR_PPI_F   HDR_F_DEF(PPI)
#define HDR_PRIORITY_F   HDR_F_DEF(PRIORITY)
#define HDR_PRIVACY_F   HDR_F_DEF(PRIVACY)
#define HDR_PROXYAUTH_F   HDR_F_DEF(PROXYAUTH)
#define HDR_PROXYREQUIRE_F   HDR_F_DEF(PROXYREQUIRE)
#define HDR_RECORDROUTE_F   HDR_F_DEF(RECORDROUTE)
#define HDR_REFER_TO_F   HDR_F_DEF(REFER_TO)
#define HDR_RETRY_AFTER_F   HDR_F_DEF(RETRY_AFTER)
#define HDR_ROUTE_F   HDR_F_DEF(ROUTE)
#define HDR_RPID_F   HDR_F_DEF(RPID)
#define HDR_SESSION_EXPIRES_F   HDR_F_DEF(SESSION_EXPIRES)
#define HDR_SUBJECT_F   HDR_F_DEF(SUBJECT)
#define HDR_SUPPORTED_F   HDR_F_DEF(SUPPORTED)
#define HDR_T2F(type)   (((type)!=HDR_EOH_T)?((hdr_flags_t)1<<(type)):(~(hdr_flags_t)0))
#define HDR_TO_F   HDR_F_DEF(TO)
#define HDR_UNSUPPORTED_F   HDR_F_DEF(UNSUPPORTED)
#define HDR_USERAGENT_F   HDR_F_DEF(USERAGENT)
#define HDR_VIA1_F   HDR_F_DEF(VIA1)
#define HDR_VIA2_F   HDR_F_DEF(VIA2)
#define HDR_VIA_F   HDR_F_DEF(VIA)

Typedefs

typedef unsigned long long hdr_flags_t
typedef enum _hdr_types_t hdr_types_t

Enumerations

enum  _hdr_types_t {
  HDR_ERROR_T = -1, HDR_OTHER_T = 0, HDR_VIA_T = 1, HDR_VIA1_T = 1,
  HDR_VIA2_T = 2, HDR_TO_T, HDR_FROM_T, HDR_CSEQ_T,
  HDR_CALLID_T, HDR_CONTACT_T, HDR_MAXFORWARDS_T, HDR_ROUTE_T,
  HDR_RECORDROUTE_T, HDR_PATH_T, HDR_CONTENTTYPE_T, HDR_CONTENTLENGTH_T,
  HDR_AUTHORIZATION_T, HDR_EXPIRES_T, HDR_PROXYAUTH_T, HDR_SUPPORTED_T,
  HDR_PROXYREQUIRE_T, HDR_UNSUPPORTED_T, HDR_ALLOW_T, HDR_EVENT_T,
  HDR_ACCEPT_T, HDR_ACCEPTLANGUAGE_T, HDR_ORGANIZATION_T, HDR_PRIORITY_T,
  HDR_SUBJECT_T, HDR_USERAGENT_T, HDR_ACCEPTDISPOSITION_T, HDR_CONTENTDISPOSITION_T,
  HDR_DIVERSION_T, HDR_RPID_T, HDR_REFER_TO_T, HDR_SESSION_EXPIRES_T,
  HDR_MIN_SE_T, HDR_PPI_T, HDR_PAI_T, HDR_PRIVACY_T,
  HDR_RETRY_AFTER_T, HDR_EOH_T
}

Functions

void clean_hdr_field (struct hdr_field *hf)
void dump_hdr_field (struct hdr_field *hf)
void free_hdr_field_lst (struct hdr_field *hf)
static int hdr_allocs_parse (struct hdr_field *hdr)


Detailed Description

Defines for SIP header types.

Definition in file hf.h.


Define Documentation

#define HDR_ACCEPT_F   HDR_F_DEF(ACCEPT)

Definition at line 134 of file hf.h.

Referenced by parse_accept_hdr(), and parse_headers().

#define HDR_ACCEPTDISPOSITION_F   HDR_F_DEF(ACCEPTDISPOSITION)

Definition at line 140 of file hf.h.

Referenced by parse_headers().

#define HDR_ACCEPTLANGUAGE_F   HDR_F_DEF(ACCEPTLANGUAGE)

Definition at line 135 of file hf.h.

Referenced by parse_headers(), run_language_switch(), and run_proxy().

#define HDR_ALLOW_F   HDR_F_DEF(ALLOW)

Definition at line 132 of file hf.h.

Referenced by parse_headers().

#define HDR_AUTHORIZATION_F   HDR_F_DEF(AUTHORIZATION)

Definition at line 126 of file hf.h.

Referenced by ds_hash_authusername(), find_credentials(), and parse_headers().

#define HDR_CALLID_F   HDR_F_DEF(CALLID)

#define HDR_CONTACT_F   HDR_F_DEF(CONTACT)

#define HDR_CONTENTDISPOSITION_F   HDR_F_DEF(CONTENTDISPOSITION)

Definition at line 141 of file hf.h.

Referenced by parse_content_disposition(), and parse_headers().

#define HDR_CONTENTLENGTH_F   HDR_F_DEF(CONTENTLENGTH)

#define HDR_CONTENTTYPE_F   HDR_F_DEF(CONTENTTYPE)

Definition at line 124 of file hf.h.

Referenced by parse_content_type_hdr(), and parse_headers().

#define HDR_CSEQ_F   HDR_F_DEF(CSEQ)

#define HDR_DIVERSION_F   HDR_F_DEF(DIVERSION)

Definition at line 142 of file hf.h.

Referenced by add_diversion_helper(), parse_diversion_header(), and parse_headers().

#define HDR_EOH_F   HDR_F_DEF(EOH)

#define HDR_EVENT_F   HDR_F_DEF(EVENT)

Definition at line 133 of file hf.h.

Referenced by parse_headers().

#define HDR_EXPIRES_F   HDR_F_DEF(EXPIRES)

Definition at line 127 of file hf.h.

Referenced by get_expires(), m_dump(), and parse_headers().

#define HDR_F_DEF ( name   )     HDR_T2F(HDR_##name##_T)

helper macro for easy defining and keeping in sync. the flags enum

Definition at line 105 of file hf.h.

#define HDR_FROM_F   HDR_F_DEF(FROM)

#define HDR_MAXFORWARDS_F   HDR_F_DEF(MAXFORWARDS)

Definition at line 120 of file hf.h.

Referenced by is_maxfwd_present(), and parse_headers().

#define HDR_MIN_SE_F   HDR_F_DEF(MIN_SE)

Definition at line 146 of file hf.h.

Referenced by parse_headers().

#define HDR_ORGANIZATION_F   HDR_F_DEF(ORGANIZATION)

Definition at line 136 of file hf.h.

Referenced by parse_headers(), run_proxy(), and run_string_switch().

#define HDR_OTHER_F   HDR_F_DEF(OTHER)

Definition at line 151 of file hf.h.

#define HDR_PAI_F   HDR_F_DEF(PAI)

Definition at line 148 of file hf.h.

Referenced by parse_headers(), and parse_pai_header().

#define HDR_PATH_F   HDR_F_DEF(PATH)

Definition at line 123 of file hf.h.

Referenced by parse_headers(), and prepend_path().

#define HDR_PPI_F   HDR_F_DEF(PPI)

Definition at line 147 of file hf.h.

Referenced by parse_headers(), and parse_ppi_header().

#define HDR_PRIORITY_F   HDR_F_DEF(PRIORITY)

Definition at line 137 of file hf.h.

Referenced by parse_headers(), run_priority_switch(), and run_proxy().

#define HDR_PRIVACY_F   HDR_F_DEF(PRIVACY)

Definition at line 149 of file hf.h.

Referenced by parse_headers(), and parse_privacy().

#define HDR_PROXYAUTH_F   HDR_F_DEF(PROXYAUTH)

Definition at line 128 of file hf.h.

Referenced by ds_hash_authusername(), find_credentials(), and parse_headers().

#define HDR_PROXYREQUIRE_F   HDR_F_DEF(PROXYREQUIRE)

Definition at line 130 of file hf.h.

Referenced by parse_headers().

#define HDR_RECORDROUTE_F   HDR_F_DEF(RECORDROUTE)

Definition at line 122 of file hf.h.

Referenced by parse_headers().

#define HDR_REFER_TO_F   HDR_F_DEF(REFER_TO)

Definition at line 144 of file hf.h.

Referenced by parse_headers(), and parse_refer_to_header().

#define HDR_RETRY_AFTER_F   HDR_F_DEF(RETRY_AFTER)

Definition at line 150 of file hf.h.

Referenced by reply_received().

#define HDR_ROUTE_F   HDR_F_DEF(ROUTE)

Definition at line 121 of file hf.h.

Referenced by ac_cancel(), ac_uac_req(), find_first_route(), find_next_route(), and parse_headers().

#define HDR_RPID_F   HDR_F_DEF(RPID)

Definition at line 143 of file hf.h.

Referenced by parse_headers(), and parse_rpid_header().

#define HDR_SESSION_EXPIRES_F   HDR_F_DEF(SESSION_EXPIRES)

Definition at line 145 of file hf.h.

Referenced by parse_headers().

#define HDR_SUBJECT_F   HDR_F_DEF(SUBJECT)

Definition at line 138 of file hf.h.

Referenced by parse_headers(), run_proxy(), and run_string_switch().

#define HDR_SUPPORTED_F   HDR_F_DEF(SUPPORTED)

Definition at line 129 of file hf.h.

Referenced by parse_headers().

#define HDR_T2F ( type   )     (((type)!=HDR_EOH_T)?((hdr_flags_t)1<<(type)):(~(hdr_flags_t)0))

Type to flag conversion WARNING: HDR_ERROR_T has no corresponding FLAG!

Definition at line 101 of file hf.h.

Referenced by extract_allowed_headers(), and find_credentials().

#define HDR_TO_F   HDR_F_DEF(TO)

#define HDR_UNSUPPORTED_F   HDR_F_DEF(UNSUPPORTED)

Definition at line 131 of file hf.h.

Referenced by parse_headers().

#define HDR_USERAGENT_F   HDR_F_DEF(USERAGENT)

Definition at line 139 of file hf.h.

Referenced by get_user_agent(), pack_ci(), parse_headers(), run_proxy(), and run_string_switch().

#define HDR_VIA1_F   HDR_F_DEF(VIA1)

Definition at line 113 of file hf.h.

Referenced by pike_check_req(), and t_check().

#define HDR_VIA2_F   HDR_F_DEF(VIA2)

Definition at line 114 of file hf.h.

Referenced by forward_reply(), parse_headers(), preprocess_request(), and sipping_rpl_filter().

#define HDR_VIA_F   HDR_F_DEF(VIA)

Definition at line 112 of file hf.h.

Referenced by ac_reply(), parse_headers(), and parse_msg().


Typedef Documentation

typedef unsigned long long hdr_flags_t

Definition at line 95 of file hf.h.

typedef enum _hdr_types_t hdr_types_t

Definition at line 153 of file hf.h.


Enumeration Type Documentation

SIP Header types. if you add a new type:

  • make sure it's not greater than 63
  • make sure you add the corresponding flag to the hdr_flags_t defs below
  • update clean_hdr_field (in hf.c)
  • update sip_msg_cloner (modules/tm/sip_msg.c)
  • update parse_headers (msg_parser.c)
Enumerator:
HDR_ERROR_T  Error while parsing
HDR_OTHER_T  Some other header field
HDR_VIA_T  Via header field
HDR_VIA1_T  First Via header field
HDR_VIA2_T  only used as flag
HDR_TO_T  To header field
HDR_FROM_T  From header field
HDR_CSEQ_T  CSeq header field
HDR_CALLID_T  Call-Id header field
HDR_CONTACT_T  Contact header field
HDR_MAXFORWARDS_T  MaxForwards header field
HDR_ROUTE_T  Route header field
HDR_RECORDROUTE_T  Record-Route header field
HDR_PATH_T  Path header fiels
HDR_CONTENTTYPE_T  Content-Type header field
HDR_CONTENTLENGTH_T  Content-Length header field
HDR_AUTHORIZATION_T  Authorization header field
HDR_EXPIRES_T  Expires header field
HDR_PROXYAUTH_T  Proxy-Authorization hdr field
HDR_SUPPORTED_T  Supported header field
HDR_PROXYREQUIRE_T  Proxy-Require header field
HDR_UNSUPPORTED_T  Unsupported header field
HDR_ALLOW_T  Allow header field
HDR_EVENT_T  Event header field
HDR_ACCEPT_T  Accept header field
HDR_ACCEPTLANGUAGE_T  Accept-Language header field
HDR_ORGANIZATION_T  Organization header field
HDR_PRIORITY_T  Priority header field
HDR_SUBJECT_T  Subject header field
HDR_USERAGENT_T  User-Agent header field
HDR_ACCEPTDISPOSITION_T  Accept-Disposition hdr field
HDR_CONTENTDISPOSITION_T  Content-Disposition hdr field
HDR_DIVERSION_T  Diversion header field
HDR_RPID_T  Remote-Party-ID header field
HDR_REFER_TO_T  Refer-To header fiels
HDR_SESSION_EXPIRES_T  Session-Expires header field
HDR_MIN_SE_T  Min-SE header field
HDR_PPI_T  P-Preferred-Identity header field
HDR_PAI_T  P-Asserted-Identity header field
HDR_PRIVACY_T  Privacy header field
HDR_RETRY_AFTER_T  Retry-After header field
HDR_EOH_T  Some other header field

Definition at line 49 of file hf.h.


Function Documentation

void clean_hdr_field ( struct hdr_field hf  ) 

void dump_hdr_field ( struct hdr_field hf  ) 

Output the contents of a header to the logging system with log level ERROR.

Parameters:
hf header that is dumped

Definition at line 219 of file hf.c.

References hdr_field::body, _str::len, LM_ERR, hdr_field::name, hdr_field::next, hdr_field::parsed, _str::s, hdr_field::type, and ZSW.

void free_hdr_field_lst ( struct hdr_field hf  ) 

Frees a hdr_field list. WARNING: frees only ->parsed and ->next

Parameters:
hf header field that should be freed
Frees a hdr_field list,
Warning:
frees only ->parsed and ->next

Definition at line 207 of file hf.c.

References clean_hdr_field(), hdr_field::next, and pkg_free.

Referenced by ac_cancel(), ac_uac_req(), build_local(), free_sip_msg(), free_sip_msg_lite(), mi_tm_uac_dlg(), and shmcontact2dset().

static int hdr_allocs_parse ( struct hdr_field hdr  )  [inline, static]


Generated on Wed May 23 06:01:04 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6