parse_uri.c File Reference

SIP URI parser. More...

#include "parse_uri.h"
#include <string.h>
#include "../dprint.h"
#include "../ut.h"
#include "../error.h"
#include "../errinfo.h"
#include "../core_stats.h"

Include dependency graph for parse_uri.c:

Go to the source code of this file.

Defines

#define case_port(ch, var)
#define check_host_end
#define colon_case
#define param_common_cases
#define param_set(t_start, v_start)
#define param_switch(old_state, c1, c2, new_state)
#define param_switch1(old_state, c1, new_state)
#define param_switch_big(old_state, c1, c2, d1, d2, new_state_c, new_state_d)
#define question_case
#define semicolon_case
#define SIP_SCH   0x3a706973
#define SIPS_SCH   0x73706973
#define still_at_user
#define TEL_SCH   0x3a6c6574
#define transport_fin(c_state, proto_no)
#define value_common_cases
#define value_switch(old_state, c1, c2, new_state)
#define value_switch_big(old_state, c1, c2, d1, d2, new_state_c, new_state_d)

Functions

int parse_orig_ruri (struct sip_msg *msg)
int parse_sip_msg_uri (struct sip_msg *msg)
int parse_uri (char *buf, int len, struct sip_uri *uri)


Detailed Description

SIP URI parser.

Definition in file parse_uri.c.


Define Documentation

#define case_port ( ch,
var   ) 

Value:

case ch: \
          (var)=(var)*10+ch-'0'; \
          break

Referenced by parse_uri().

#define check_host_end

Referenced by parse_uri().

#define colon_case

Referenced by parse_uri().

#define param_common_cases

Referenced by parse_uri().

#define param_set ( t_start,
v_start   ) 

Value:

param->s=(t_start);\
               param->len=(p-(t_start));\
               param_val->s=(v_start); \
               param_val->len=(p-(v_start))

Referenced by parse_uri().

#define param_switch ( old_state,
c1,
c2,
new_state   ) 

Referenced by parse_uri().

#define param_switch1 ( old_state,
c1,
new_state   ) 

Referenced by parse_uri().

#define param_switch_big ( old_state,
c1,
c2,
d1,
d2,
new_state_c,
new_state_d   ) 

Referenced by parse_uri().

#define question_case

Referenced by parse_uri().

#define semicolon_case

Referenced by parse_uri().

#define SIP_SCH   0x3a706973

#define SIPS_SCH   0x73706973

#define still_at_user

Referenced by parse_uri().

#define TEL_SCH   0x3a6c6574

#define transport_fin ( c_state,
proto_no   ) 

Referenced by parse_uri().

#define value_common_cases

Referenced by parse_uri().

#define value_switch ( old_state,
c1,
c2,
new_state   ) 

Referenced by parse_uri().

#define value_switch_big ( old_state,
c1,
c2,
d1,
d2,
new_state_c,
new_state_d   ) 

Referenced by parse_uri().


Function Documentation

int parse_orig_ruri ( struct sip_msg msg  ) 

int parse_sip_msg_uri ( struct sip_msg msg  ) 

int parse_uri ( char *  buf,
int  len,
struct sip_uri uri 
)

buf= pointer to begining of uri (sip:x@foo.bar:5060;a=b?h=i) len= len of uri returns: fills uri & returns <0 on error or 0 if ok

Definition at line 55 of file parse_uri.c.

References case_port, check_host_end, colon_case, E_BAD_URI, ERROR_URI_T, sip_uri::headers, sip_uri::host, _str::len, LM_CRIT, LM_DBG, LM_ERR, sip_uri::lr, sip_uri::lr_val, sip_uri::maddr, sip_uri::maddr_val, sip_uri::method, sip_uri::method_val, param_common_cases, param_set, param_switch, param_switch1, param_switch_big, sip_uri::params, sip_uri::passwd, sip_uri::port, sip_uri::port_no, port_no, sip_uri::proto, PROTO_SCTP, PROTO_TCP, PROTO_TLS, PROTO_UDP, question_case, sip_uri::r2, sip_uri::r2_val, _str::s, s, semicolon_case, ser_error, SIP_SCH, SIP_URI_T, SIPS_SCH, SIPS_URI_T, still_at_user, TEL_SCH, TEL_URI_T, TELS_URI_T, sip_uri::transport, transport_fin, sip_uri::transport_val, sip_uri::ttl, sip_uri::ttl_val, sip_uri::type, update_stat, sip_uri::user, user, sip_uri::user_param, sip_uri::user_param_val, value_common_cases, value_switch, value_switch_big, and ZSW.

Referenced by add_contacts_to_loc_set(), add_dest2list(), add_uri_param(), after_loose(), after_strict(), append_fixed_vars(), authorize(), build_path_vector(), calculate_hooks(), check_options_callback(), cmp_aor_str(), cmp_uri_str(), decode_uri_sip_xmpp(), determine_fromto_user(), diameter_is_user_in(), do_action(), encode2format(), encode_contact(), encode_digest(), encode_location_attr(), encode_msg(), encode_rmvloc_attr(), encode_route(), encode_to_body(), encode_uri_sip_xmpp(), eval_elem(), extract_aor(), extract_sdialog_info(), get_contact_uri(), get_dest_user(), get_maddr_uri(), get_orig_user(), get_p_notify_body(), get_plain_uri(), get_realm(), get_resource_list(), get_sphere(), get_uri_hash_keys(), get_username(), get_username_domain(), handle_publish(), handle_subscribe(), imc_handle_invite(), imc_handle_remove(), imc_manager(), imc_mi_list_members(), insert_contacts(), is_from_user_enum_2(), is_rpid_user_e164(), is_uri_host_local(), is_uri_user_e164(), m_dump(), m_store(), mi_cpl_get(), mi_cpl_load(), mi_cpl_remove(), mi_pua_publish(), mi_pua_subscribe(), mi_refreshWatchers(), mi_tm_uac_dlg(), mod_init(), nh_timer(), ops_dbdelete_avps(), ops_dbload_avps(), ops_dbstore_avps(), ospGetFromUserpart(), ospGetNextHop(), ospGetRouteParameters(), ospGetRpidUserpart(), ospGetToUserpart(), parse_from_uri(), parse_orig_ruri(), parse_ppi_uri(), parse_sip_msg_uri(), parse_to_uri(), prefix2domain(), process_routeset(), push_on_network(), radius_does_uri_exist_1(), refresh_watcher(), request_winfo(), run_address_switch(), sd_lookup(), update_contacts(), uri2proxy(), and xj_extract_aor().


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