mod.h

Go to the documentation of this file.
00001 
00114 #ifndef I_CSCF_MOD_H
00115 #define I_CSCF_MOD_H
00116 
00117 #define M_NAME "I-CSCF"
00118 
00119 #include "../../sr_module.h"
00120 
00122 #define CSCF_RETURN_BREAK   0 
00123 
00124 #define CSCF_RETURN_TRUE    1
00125 
00126 #define CSCF_RETURN_FALSE -1
00127 
00128 #define CSCF_RETURN_ERROR -2
00129 
00130 
00131 #define STR_SHM_DUP(dest,src,txt)\
00132 {\
00133     if ((src).len==0) {\
00134         (dest).s=0;\
00135         (dest).len=0;\
00136     }else {\
00137         (dest).s = shm_malloc((src).len);\
00138         if (!(dest).s){\
00139             LOG(L_ERR,"ERR:"M_NAME":"txt": Error allocating %d bytes\n",(src).len);\
00140             (dest).len = 0;\
00141             goto out_of_memory;\
00142         }else{\
00143             (dest).len = (src).len;\
00144             memcpy((dest).s,(src).s,(src).len);\
00145         }\
00146     }\
00147 }
00148 
00149 #define STR_PKG_DUP(dest,src,txt)\
00150 {\
00151     if ((src).len==0) {\
00152         (dest).s=0;\
00153         (dest).len=0;\
00154     }else {\
00155         (dest).s = pkg_malloc((src).len);\
00156         if (!(dest).s){\
00157             LOG(L_ERR,"ERRL:"M_NAME":"txt": Error allocating %d bytes\n",(src).len);\
00158             (dest).len = 0;\
00159             goto out_of_memory;\
00160         }else{\
00161             (dest).len = (src).len;\
00162             memcpy((dest).s,(src).s,(src).len);\
00163         }\
00164     }\
00165 }
00166 
00167 
00168 #define STR_APPEND(dst,src)\
00169     {memcpy((dst).s+(dst).len,(src).s,(src).len);\
00170     (dst).len = (dst).len + (src).len;}
00171 
00172 
00173 
00174 int I_add_p_charging_vector(struct sip_msg *msg,char *str1,char*str2);
00175 
00176 
00177 #endif /* I_CSCF_MOD_H */

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