• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

error.h

00001 /*
00002  * $Id$
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  * ser is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License 
00019  * along with this program; if not, write to the Free Software 
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 
00023 
00024 #ifndef error_h
00025 #define error_h
00026 
00027 #define E_OK           0
00028 #define E_UNSPEC      -1
00029 #define E_OUT_OF_MEM  -2
00030 #define E_BAD_RE      -3
00031 /* #define E_BAD_ADDRESS -4 */
00032 #define E_BUG         -5
00033 #define E_CFG         -6
00034 #define E_NO_SOCKET             -7
00035 /* unresolvable topmost Via */
00036 #define E_BAD_VIA               -8
00037 /* incomplete transaction tuple */
00038 #define E_BAD_TUPEL             -9
00039 /* script programming error */
00040 #define E_SCRIPT                -10
00041 /* error in execution of external tools */
00042 #define E_EXEC                  -11
00043 /* too many branches demanded */
00044 #define E_TOO_MANY_BRANCHES -12
00045 #define E_BAD_TO        -13
00046 /* invalid params */
00047 #define E_INVALID_PARAMS -14
00048 
00049 #define E_Q_INV_CHAR    -15 /* Invalid character in q */
00050 #define E_Q_EMPTY       -16 /* Empty q */
00051 #define E_Q_TOO_BIG     -17 /* q too big (> 1) */
00052 #define E_Q_DEC_MISSING -18 /* Decimal part missing */
00053 
00054 
00055 
00056 #define E_SEND            -477
00057 /* unresolvable next-hop address */
00058 #define E_BAD_ADDRESS -478
00059 /* unparseable URI */
00060 #define E_BAD_URI         -479
00061 /* bad protocol, like */
00062 #define E_BAD_PROTO       -480
00063 /* malformed request */
00064 #define E_BAD_REQ         -400
00065 
00066 #define E_CANCELED      -487 /* transaction already canceled */
00067 
00068 /* error in server */
00069 #define E_BAD_SERVER      -500
00070 #define E_ADM_PROHIBITED  -510
00071 #define E_BLACKLISTED     -520
00072 
00073 
00074 #define MAX_REASON_LEN  128
00075 
00076 #include "str.h"
00077 
00078 /* processing status of the last command */
00079 extern int ser_error;
00080 extern int prev_ser_error;
00081 
00082 struct sip_msg;
00083 
00084 /* ser error -> SIP error */
00085 int err2reason_phrase( int ser_error, int *sip_error, 
00086                 char *phrase, int etl, char *signature );
00087 
00088 /* SIP error core -> SIP text */
00089 char *error_text( int code );
00090 
00091 /* return pkg_malloc-ed reply status in status->s */
00092 void get_reply_status( str *status, struct sip_msg *reply, int code );
00093 
00094 #endif

Generated on Tue May 22 2012 13:10:07 for SIP Router by  doxygen 1.7.1