mod.h File Reference


Detailed Description

Serving-CSCF - SER module interface.

Author:
Dragos Vingarzan vingarzan -at- fokus dot fraunhofer dot de

Definition in file mod.h.

#include "../../sr_module.h"
#include "../../mem/shm_mem.h"
#include "../../mem/mem.h"

Go to the source code of this file.

Defines

#define M_NAME   "S-CSCF"
#define CSCF_RETURN_BREAK   0
 Return and break the execution of routing script.
#define CSCF_RETURN_TRUE   1
 Return true in the routing script.
#define CSCF_RETURN_FALSE   -1
 Return false in the routing script.
#define CSCF_RETURN_ERROR   -2
 Return error in the routing script.
#define STR_SHM_DUP(dest, src, txt)
#define STR_PKG_DUP(dest, src, txt)
#define STR_APPEND(dst, src)
#define ANSI_GRAY   "\033[01;30m"
#define ANSI_BLINK_RED   "\033[00;31m"
#define ANSI_RED   "\033[01;31m"
#define ANSI_GREEN   "\033[01;32m"
#define ANSI_YELLOW   "\033[01;33m"
#define ANSI_BLUE   "\033[01;34m"
#define ANSI_MAGENTA   "\033[01;35m"
#define ANSI_CYAN   "\033[01;36m"
#define ANSI_WHITE   "\033[01;37m"

Functions

int S_trans_in_processing (struct sip_msg *msg, char *str1, char *str2)
 Checks if this transaction is already in processing.


Define Documentation

#define M_NAME   "S-CSCF"

Definition at line 130 of file mod.h.

#define CSCF_RETURN_BREAK   0

Return and break the execution of routing script.

Definition at line 133 of file mod.h.

#define CSCF_RETURN_TRUE   1

Return true in the routing script.

Definition at line 135 of file mod.h.

#define CSCF_RETURN_FALSE   -1

Return false in the routing script.

Definition at line 137 of file mod.h.

#define CSCF_RETURN_ERROR   -2

Return error in the routing script.

Definition at line 139 of file mod.h.

#define STR_SHM_DUP ( dest,
src,
txt   ) 

Value:

{\
    if ((src).len==0) {\
        (dest).s=0;\
        (dest).len=0;\
    }else {\
        (dest).s = shm_malloc((src).len);\
        if (!(dest).s){\
            LOG(L_ERR,"ERR:"M_NAME":"txt": Error allocating %d bytes\n",(src).len);\
            (dest).len = 0;\
            goto out_of_memory;\
        }else{\
            (dest).len = (src).len;\
            memcpy((dest).s,(src).s,(src).len);\
        }\
    }\
}

Definition at line 144 of file mod.h.

#define STR_PKG_DUP ( dest,
src,
txt   ) 

Value:

{\
    if ((src).len==0) {\
        (dest).s=0;\
        (dest).len=0;\
    }else {\
        (dest).s = pkg_malloc((src).len);\
        if (!(dest).s){\
            LOG(L_ERR,"ERRL:"M_NAME":"txt": Error allocating %d bytes\n",(src).len);\
            (dest).len = 0;\
            goto out_of_memory;\
        }else{\
            (dest).len = (src).len;\
            memcpy((dest).s,(src).s,(src).len);\
        }\
    }\
}

Definition at line 162 of file mod.h.

#define STR_APPEND ( dst,
src   ) 

Value:

{memcpy((dst).s+(dst).len,(src).s,(src).len);\
    (dst).len = (dst).len + (src).len;}

Definition at line 180 of file mod.h.

#define ANSI_GRAY   "\033[01;30m"

Definition at line 186 of file mod.h.

#define ANSI_BLINK_RED   "\033[00;31m"

Definition at line 187 of file mod.h.

#define ANSI_RED   "\033[01;31m"

Definition at line 188 of file mod.h.

#define ANSI_GREEN   "\033[01;32m"

Definition at line 189 of file mod.h.

#define ANSI_YELLOW   "\033[01;33m"

Definition at line 190 of file mod.h.

#define ANSI_BLUE   "\033[01;34m"

Definition at line 191 of file mod.h.

#define ANSI_MAGENTA   "\033[01;35m"

Definition at line 192 of file mod.h.

#define ANSI_CYAN   "\033[01;36m"

Definition at line 193 of file mod.h.

#define ANSI_WHITE   "\033[01;37m"

Definition at line 194 of file mod.h.


Function Documentation

int S_trans_in_processing ( struct sip_msg *  msg,
char *  str1,
char *  str2 
)

Checks if this transaction is already in processing.

Parameters:
msg - the SIP message
str1 - not used
str2 - not used
Returns:
CSCF_RETURN_TRUE if in processing or CSCF_RETURN_FALSE if not

Definition at line 842 of file mod.c.

References CSCF_RETURN_FALSE, and CSCF_RETURN_TRUE.

00843 {
00844     unsigned int hash, label;
00845     if (tmb.t_get_trans_ident(msg,&hash,&label)<0)
00846         return CSCF_RETURN_FALSE;
00847     return CSCF_RETURN_TRUE;    
00848 }


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