error.h
a15c363f
 /*
  * $Id$
  */
 
 #ifndef error_h
 #define error_h
 
3e429f5c
 #define E_UNSPEC      -1
a15c363f
 #define E_OUT_OF_MEM  -2
 #define E_BAD_RE      -3
1400b772
 /* #define E_BAD_ADDRESS -4 */
a15c363f
 #define E_BUG         -5
3e429f5c
 #define E_CFG         -6
1400b772
 #define E_NO_SOCKET		-7
caf80ae6
 /* unresolveable topmost Via */
 #define E_BAD_VIA		-8
 /* incomplete transaction tupel */
 #define E_BAD_TUPEL		-9
 /* script programming error */
 #define E_SCRIPT		-10
1400b772
 
 #define E_SEND		  -477
 /* unresolveable next-hop address */
 #define E_BAD_ADDRESS -478
 /* unparseable URI */
 #define E_BAD_URI 	  -479
 /* misformated request */
 #define E_BAD_REQ	  -400
 
 #define MAX_REASON_LEN	128
 
caf80ae6
 #include "str.h"
 
1400b772
 /* processing status of the last command */
 extern int ser_error;
 extern int prev_ser_error;
 
caf80ae6
 struct sip_msg;
 
 /* ser error -> SIP error */
1400b772
 int err2reason_phrase( int ser_error, int *sip_error, 
                 char *phrase, int etl, char *signature );
a15c363f
 
caf80ae6
 /* SIP error core -> SIP text */
 char *error_text( int code );
 
 /* return pkg_malloc-ed reply status in status->s */
 void get_reply_status( str *status, struct sip_msg *reply, int code );
a15c363f
 
 #endif