sip.h

Go to the documentation of this file.
00001 /*
00002  * $Id: sip.h 570 2008-06-25 13:21:32Z vingarzan $
00003  *  
00004  * Copyright (C) 2004-2006 FhG Fokus
00005  *
00006  * This file is part of Open IMS Core - an open source IMS CSCFs & HSS
00007  * implementation
00008  *
00009  * Open IMS Core is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * For a license to use the Open IMS Core software under conditions
00015  * other than those described here, or to purchase support for this
00016  * software, please contact Fraunhofer FOKUS by e-mail at the following
00017  * addresses:
00018  *     info@open-ims.org
00019  *
00020  * Open IMS Core is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  * GNU General Public License for more details.
00024  * 
00025  * It has to be noted that this Open Source IMS Core System is not 
00026  * intended to become or act as a product in a commercial context! Its 
00027  * sole purpose is to provide an IMS core reference implementation for 
00028  * IMS technology testing and IMS application prototyping for research 
00029  * purposes, typically performed in IMS test-beds.
00030  * 
00031  * Users of the Open Source IMS Core System have to be aware that IMS
00032  * technology may be subject of patents and licence terms, as being 
00033  * specified within the various IMS-related IETF, ITU-T, ETSI, and 3GPP
00034  * standards. Thus all Open IMS Core users have to take notice of this 
00035  * fact and have to agree to check out carefully before installing, 
00036  * using and extending the Open Source IMS Core System, if related 
00037  * patents and licences may become applicable to the intended usage 
00038  * context.  
00039  *
00040  * You should have received a copy of the GNU General Public License
00041  * along with this program; if not, write to the Free Software
00042  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00043  * 
00044  */
00045 
00056 #ifndef PIS_CSCF_SIP_H
00057 #define PIS_CSCF_SIP_H
00058 
00059 #include "../../sr_module.h"
00060 #include "../../parser/contact/parse_contact.h"
00061 #include "../../parser/digest/digest.h"
00062 #include "../../parser/parse_rr.h"
00063 
00064 int cscf_add_header_first(struct sip_msg *msg, str *hdr,int type);
00065 int cscf_add_header(struct sip_msg *msg, str *hdr,int type);
00066 int cscf_add_header_rpl(struct sip_msg *msg, str *hdr);
00067 int cscf_add_contact(struct sip_msg *msg,str uri,int expires);
00068 
00069 str cscf_get_private_identity(struct sip_msg *msg, str realm);
00070 str cscf_get_public_identity(struct sip_msg *msg);
00071 int cscf_get_expires_hdr(struct sip_msg *msg);
00072 int cscf_get_max_expires(struct sip_msg *msg);
00073 str cscf_get_public_identity_from_requri(struct sip_msg *msg);
00074 
00075 struct sip_msg *cscf_get_request(unsigned int hash,unsigned int label);
00076 
00077 int cscf_get_integrity_protected(struct sip_msg *msg,str realm);
00078 int cscf_get_transaction(struct sip_msg *msg, unsigned  int *hash, unsigned int *label);
00079 int cscf_reply_transactional(struct sip_msg *msg, int code, char *text);
00080 str cscf_get_auts(struct sip_msg *msg, str realm);
00081 str cscf_get_nonce(struct sip_msg *msg, str realm);
00082 str cscf_get_algorithm(struct sip_msg *msg, str realm);
00083 str cscf_get_digest_uri(struct sip_msg *msg, str realm);
00084 int cscf_get_nonce_response(struct sip_msg *msg, str realm,str *nonce,str *response,
00085     enum qop_type *qop,str *qop_str,str *nc,str *cnonce,str *uri);
00086 str cscf_get_user_agent(struct sip_msg *msg);
00087 contact_body_t *cscf_parse_contacts(struct sip_msg *msg);
00088 str cscf_get_path(struct sip_msg *msg);
00089 str cscf_get_event(struct sip_msg *msg);
00090 str cscf_get_asserted_identity(struct sip_msg *msg);
00091 str cscf_get_asserted_identity_domain(struct sip_msg *msg);
00092 str cscf_get_contact(struct sip_msg *msg);
00093 
00094 str cscf_get_first_route(struct sip_msg *msg,struct hdr_field **hr);
00095 int cscf_remove_first_route(struct sip_msg *msg,str value);
00096 
00097 int cscf_remove_own_route(struct sip_msg *msg,struct hdr_field **h);
00098 
00099 str cscf_get_record_routes(struct sip_msg *msg);
00100 
00101 struct hdr_field* cscf_get_next_record_route(struct sip_msg *msg,struct hdr_field *start);
00102 
00103 struct hdr_field* cscf_get_next_via_hdr(struct sip_msg *msg,struct hdr_field *start);
00104 str cscf_get_next_via_str(struct sip_msg *msg, struct hdr_field * h, int pos, struct hdr_field **h_out, int *pos_out);
00105 
00106 int cscf_via_matching( struct via_body *req_via, struct via_body *rpl_via );
00107 int cscf_str_via_matching(str *sreq_via, str *srpl_via);
00108 
00109 str cscf_get_realm_from_ruri(struct sip_msg *msg);
00110 
00111 str cscf_get_identity_from_ruri(struct sip_msg *msg);
00112 
00113 str cscf_get_call_id(struct sip_msg *msg,struct hdr_field **hr);
00114 int cscf_get_cseq(struct sip_msg *msg,struct hdr_field **hr);
00115 str cscf_get_cseq_method(struct sip_msg *msg,struct hdr_field **hr);
00116 
00117 struct sip_msg* cscf_get_request_from_reply(struct sip_msg *reply);
00118 
00119 str cscf_get_called_party_id(struct sip_msg *msg,struct hdr_field **hr);
00120 
00121 int cscf_get_subscription_state(struct sip_msg *msg);
00122 
00123 // from icscf
00124 int cscf_replace_string(struct sip_msg *msg, str orig,str repl);
00125 
00126 struct hdr_field* cscf_get_header(struct sip_msg * msg , str header_name);
00127 struct hdr_field* cscf_get_next_header(struct sip_msg * msg ,
00128                          str header_name,struct hdr_field* last_header);
00129 struct hdr_field* cscf_get_next_header_type(struct sip_msg * msg ,
00130                          hdr_types_t type, struct hdr_field* last_header);                       
00131 
00132 str cscf_get_headers_content(struct sip_msg * msg , str header_name);
00133 
00134 str cscf_get_body(struct sip_msg * msg);
00135 
00136 // from pcscf
00137 
00138 str cscf_get_visited_network_id(struct sip_msg *msg, struct hdr_field **h);
00139 str cscf_get_access_network_info(struct sip_msg *msg, struct hdr_field **h);
00140 
00141 str cscf_get_authorization(struct sip_msg *msg, struct hdr_field **h);
00142 str cscf_get_authenticate(struct sip_msg *msg,struct hdr_field **h);
00143 
00144 str cscf_get_session_expires_body(struct sip_msg *msg,struct hdr_field **h);
00145 time_t cscf_get_session_expires(str expHdr, str *refresher);
00146 str cscf_get_min_se(struct sip_msg *msg,struct hdr_field **h);
00147 
00148 int cscf_del_header(struct sip_msg *msg,struct hdr_field *h);
00149 int cscf_del_all_headers(struct sip_msg *msg,int hdr_type);
00150 
00151 struct via_body* cscf_get_first_via(struct sip_msg *msg, struct hdr_field **h);
00152 struct via_body* cscf_get_last_via(struct sip_msg *msg);
00153 struct via_body* cscf_get_ue_via(struct sip_msg *msg);
00154 
00155 str cscf_get_realm(struct sip_msg *msg);
00156 str cscf_get_realm_from_uri(str uri);
00157 
00158 int cscf_get_p_associated_uri(struct sip_msg *msg,str **public_id,int *public_id_cnt);
00159 int cscf_get_first_p_associated_uri(struct sip_msg *msg,str *public_id);
00160 
00161 name_addr_t cscf_get_preferred_identity(struct sip_msg *msg,struct hdr_field **h);
00162 str cscf_get_called_party_id(struct sip_msg *msg,struct hdr_field **hr);
00163 
00164 struct hdr_field* cscf_get_next_route(struct sip_msg *msg,struct hdr_field *start);
00165 
00166 int cscf_is_myself(str uri);
00167 
00168 str cscf_get_content_type(struct sip_msg *msg);
00169 
00170 int cscf_get_content_len(struct sip_msg *msg);
00171 
00172 str* cscf_get_service_route(struct sip_msg *msg,int *size);
00173 
00174 int cscf_get_originating_contact(struct sip_msg *msg,str *host,int *port,int *transport);
00175 int cscf_get_terminating_contact(struct sip_msg *msg,str *host,int *port,int *transport);
00176 
00177 int cscf_get_terminating_identity(struct sip_msg *msg,str *uri);
00178 
00179 int cscf_add_p_charging_vector(struct sip_msg *msg);
00180 
00181 str cscf_get_last_via_sent_by(struct sip_msg *msg);
00182 str cscf_get_last_via_received(struct sip_msg *msg);
00183 
00184 int cscf_get_from_tag(struct sip_msg* msg, str* tag);
00185 int cscf_get_to_tag(struct sip_msg* msg, str* tag);
00186 int cscf_get_from_uri(struct sip_msg* msg,str *local_uri);
00187 int cscf_get_to_uri(struct sip_msg* msg,str *local_uri);
00188 #endif /* PIS_CSCF_SIP_H */

Generated on Thu Oct 23 04:14:38 2008 for Open IMS Core CSCFs by  doxygen 1.5.2