Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

error.h

Go to the documentation of this file.
00001 /*
00002  * $Id: error.h,v 1.15 2006/09/15 10:37:45 andrei Exp $
00003  *
00004  * Copyright (C) 2001-2003 FhG Fokus
00005  *
00006  * This file is part of ser, a free SIP server.
00007  *
00008  * ser is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * For a license to use the ser software under conditions
00014  * other than those described here, or to purchase support for this
00015  * software, please contact iptel.org by e-mail at the following addresses:
00016  *    info@iptel.org
00017  *
00018  * ser is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License 
00024  * along with this program; if not, write to the Free Software 
00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  */
00027 
00028 
00029 #ifndef error_h
00030 #define error_h
00031 
00032 #define E_OK           0
00033 #define E_UNSPEC      -1
00034 #define E_OUT_OF_MEM  -2
00035 #define E_BAD_RE      -3
00036 /* #define E_BAD_ADDRESS -4 */
00037 #define E_BUG         -5
00038 #define E_CFG         -6
00039 #define E_NO_SOCKET             -7
00040 /* unresolvable topmost Via */
00041 #define E_BAD_VIA               -8
00042 /* incomplete transaction tuple */
00043 #define E_BAD_TUPEL             -9
00044 /* script programming error */
00045 #define E_SCRIPT                -10
00046 /* error in execution of external tools */
00047 #define E_EXEC                  -11
00048 /* too many branches demanded */
00049 #define E_TOO_MANY_BRANCHES -12
00050 #define E_BAD_TO        -13
00051 /* invalid params */
00052 #define E_INVALID_PARAMS -14
00053 
00054 #define E_Q_INV_CHAR    -15 /* Invalid character in q */
00055 #define E_Q_EMPTY       -16 /* Empty q */
00056 #define E_Q_TOO_BIG     -17 /* q too big (> 1) */
00057 #define E_Q_DEC_MISSING -18 /* Decimal part missing */
00058 
00059 
00060 
00061 #define E_SEND            -477
00062 /* unresolvable next-hop address */
00063 #define E_BAD_ADDRESS -478
00064 /* unparseable URI */
00065 #define E_BAD_URI         -479
00066 /* bad protocol, like */
00067 #define E_BAD_PROTO       -480
00068 /* malformed request */
00069 #define E_BAD_REQ         -400
00070 
00071 #define E_CANCELED      -487 /* transaction already canceled */
00072 
00073 /* error in server */
00074 #define E_BAD_SERVER      -500
00075 #define E_ADM_PROHIBITED  -510
00076 #define E_BLACKLISTED     -520
00077 
00078 
00079 #define MAX_REASON_LEN  128
00080 
00081 #include "str.h"
00082 
00083 /* processing status of the last command */
00084 extern int ser_error;
00085 extern int prev_ser_error;
00086 
00087 struct sip_msg;
00088 
00089 /* ser error -> SIP error */
00090 int err2reason_phrase( int ser_error, int *sip_error, 
00091                 char *phrase, int etl, char *signature );
00092 
00093 /* SIP error core -> SIP text */
00094 char *error_text( int code );
00095 
00096 /* return pkg_malloc-ed reply status in status->s */
00097 void get_reply_status( str *status, struct sip_msg *reply, int code );
00098 
00099 #endif

Generated on Tue Sep 7 04:15:51 2010 for SIPExpressRouter by  doxygen 1.3.9.1