mod.h

Go to the documentation of this file.
00001 
00172 #ifndef _ISC__H
00173 #define _ISC__H
00174 
00175 #include "../../sr_module.h"
00176 
00177 #define M_NAME "ISC"
00178 
00180 #define ISC_RETURN_BREAK     0
00181 
00182 #define ISC_RETURN_TRUE      1
00183 
00184 #define ISC_RETURN_FALSE    -1
00185 
00186 #define ISC_RETURN_ERROR    -2
00187 
00189 #define ISC_MSG_FORWARDED 0
00190 
00191 #define ISC_MSG_NOT_FORWARDED 1
00192 
00193 #define ISC_NOT_A_REQUEST 2
00194 
00195 /* Various constants */
00197 #define IMS_USER_NOT_REGISTERED 0
00198 
00199 #define IMS_USER_REGISTERED 1
00200 
00201 #define IMS_USER_UNREGISTERED -1
00202 
00203 #define STR_SHM_DUP(dest,src,txt)\
00204 {\
00205     if ((src).len==0) {\
00206         (dest).s=0;\
00207         (dest).len=0;\
00208     }else {\
00209         (dest).s = shm_malloc((src).len);\
00210         if (!(dest).s){\
00211             LOG(L_ERR,"ERR:"M_NAME":"txt": Error allocating %d bytes\n",(src).len);\
00212             (dest).len = 0;\
00213             goto out_of_memory;\
00214         }else{\
00215             (dest).len = (src).len;\
00216             memcpy((dest).s,(src).s,(src).len);\
00217         }\
00218     }\
00219 }
00220 
00221 #define STR_PKG_DUP(dest,src,txt)\
00222 {\
00223     if ((src).len==0) {\
00224         (dest).s=0;\
00225         (dest).len=0;\
00226     }else {\
00227         (dest).s = pkg_malloc((src).len);\
00228         if (!(dest).s){\
00229             LOG(L_ERR,"ERRL:"M_NAME":"txt": Error allocating %d bytes\n",(src).len);\
00230             (dest).len = 0;\
00231             goto out_of_memory;\
00232         }else{\
00233             (dest).len = (src).len;\
00234             memcpy((dest).s,(src).s,(src).len);\
00235         }\
00236     }\
00237 }
00238 
00239 
00240 #define STR_APPEND(dst,src)\
00241         {memcpy((dst).s+(dst).len,(src).s,(src).len);\
00242         (dst).len = (dst).len + (src).len;}
00243 
00245 enum dialog_direction {
00246     DLG_MOBILE_ORIGINATING=0,   
00247     DLG_MOBILE_TERMINATING=1,   
00248     DLG_MOBILE_UNKNOWN=2        
00249 };
00250 
00251 #endif

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