00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
00032 #define E_BUG -5
00033 #define E_CFG -6
00034 #define E_NO_SOCKET -7
00035
00036 #define E_BAD_VIA -8
00037
00038 #define E_BAD_TUPEL -9
00039
00040 #define E_SCRIPT -10
00041
00042 #define E_EXEC -11
00043
00044 #define E_TOO_MANY_BRANCHES -12
00045 #define E_BAD_TO -13
00046
00047 #define E_INVALID_PARAMS -14
00048
00049 #define E_Q_INV_CHAR -15
00050 #define E_Q_EMPTY -16
00051 #define E_Q_TOO_BIG -17
00052 #define E_Q_DEC_MISSING -18
00053
00054
00055
00056 #define E_SEND -477
00057
00058 #define E_BAD_ADDRESS -478
00059
00060 #define E_BAD_URI -479
00061
00062 #define E_BAD_PROTO -480
00063
00064 #define E_BAD_REQ -400
00065
00066 #define E_CANCELED -487
00067
00068
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
00079 extern int ser_error;
00080 extern int prev_ser_error;
00081
00082 struct sip_msg;
00083
00084
00085 int err2reason_phrase( int ser_error, int *sip_error,
00086 char *phrase, int etl, char *signature );
00087
00088
00089 char *error_text( int code );
00090
00091
00092 void get_reply_status( str *status, struct sip_msg *reply, int code );
00093
00094 #endif