00001 /* 00002 * $Id: ifc_datastruct.h 516 2008-02-01 19:33:35Z albertoberlios $ 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 00055 #ifndef S_CSCF_IFC_DATASTRUCT_H_ 00056 #define S_CSCF_IFC_DATASTRUCT_H_ 00057 00058 #include "registrar.h" 00059 #include "../../sr_module.h" 00060 #include "../../locking.h" 00061 00062 /* IMS Subscription structures */ 00063 00065 typedef struct _ims_sip_header 00066 { 00067 str header; 00068 str content; 00069 short type; 00070 } ims_sip_header; 00071 00072 00074 typedef struct _ims_session_desc 00075 { 00076 str line; 00077 str content; 00078 } ims_session_desc; 00079 00081 #define IFC_UNKNOWN -1 00082 00083 #define IFC_REQUEST_URI 1 00084 00085 #define IFC_METHOD 2 00086 00087 #define IFC_SIP_HEADER 3 00088 00089 #define IFC_SESSION_CASE 4 00090 00091 #define IFC_SESSION_DESC 5 00092 00094 #define IFC_ORIGINATING_SESSION 0 00095 00096 #define IFC_TERMINATING_SESSION 1 00097 00098 #define IFC_TERMINATING_UNREGISTERED 2 00099 00101 #define IFC_INITIAL_REGISTRATION 1 00102 00103 #define IFC_RE_REGISTRATION 1<<1 00104 00105 #define IFC_DE_REGISTRATION 1<<2 00106 00108 typedef struct _ims_spt 00109 { 00110 char condition_negated; 00111 int group; 00112 char type; 00113 union 00114 { 00115 str request_uri; 00116 str method; 00117 ims_sip_header sip_header; 00118 char session_case; 00119 ims_session_desc session_desc; 00120 }; 00121 char registration_type; 00122 } ims_spt; 00123 00125 #define IFC_CNF 1 00126 00127 #define IFC_DNF 0 00128 00130 typedef struct _ims_trigger_point 00131 { 00132 char condition_type_cnf; 00133 ims_spt *spt; 00134 unsigned short spt_cnt; 00135 } ims_trigger_point; 00136 00138 #define IFC_NO_DEFAULT_HANDLING -1 00139 00140 #define IFC_SESSION_CONTINUED 0 00141 00142 #define IFC_SESSION_TERMINATED 1 00143 00145 typedef struct _ims_application_server 00146 { 00147 str server_name; 00148 char default_handling; 00149 str service_info; 00150 } ims_application_server; 00151 00153 typedef struct { 00154 char barring; 00155 str public_identity; 00156 str wildcarded_psi; 00157 } ims_public_identity; 00158 00160 typedef struct _ims_filter_criteria 00161 { 00162 int priority; 00163 ims_trigger_point *trigger_point; 00164 ims_application_server application_server; 00165 char *profile_part_indicator; 00166 } ims_filter_criteria; 00167 00169 typedef struct _ims_cn_service_auth 00170 { 00171 int subscribed_media_profile_id; /* must be >=0 */ 00172 } ims_cn_service_auth; 00173 00175 typedef struct { 00176 ims_public_identity *public_identities; 00177 unsigned short public_identities_cnt; 00179 ims_filter_criteria *filter_criteria; 00180 unsigned short filter_criteria_cnt; 00182 ims_cn_service_auth *cn_service_auth; 00184 int *shared_ifc_set; 00185 unsigned short shared_ifc_set_cnt; 00186 } ims_service_profile; 00187 00189 typedef struct { 00190 str private_identity; 00191 int wpsi; 00196 ims_service_profile *service_profiles; 00197 unsigned short service_profiles_cnt; 00199 int ref_count; 00200 gen_lock_t *lock; 00201 } ims_subscription; 00202 00203 #endif //S_CSCF_IFC_DATASTRUCT_H_
1.5.2