57 lines
1.6 KiB
C
57 lines
1.6 KiB
C
#ifndef _RET_ERRNO_H
|
||
#define _RET_ERRNO_H
|
||
|
||
#include "config_manager.h"
|
||
|
||
/* error no, 32位,前16位为模块ID,后16位为模块错误码 */
|
||
typedef uint ret_code;
|
||
|
||
|
||
/*0x00000000 ~ 0x0000ffff 为系统预留错误码,用于一般性系统错误,例如内存不够,输入错误等*/
|
||
|
||
/* RPC ret code 0x00000000 ~ 0x0000ffff*/
|
||
#define RET_OK 0
|
||
#define RET_ERR 1
|
||
#define RET_UNKNOWN 2
|
||
#define RET_SYSERR 3
|
||
#define RET_NOTFOUND 4
|
||
#define RET_TIMEOUT 5
|
||
|
||
#define RET_NULLP 6
|
||
#define RET_NOMEM 7
|
||
#define RET_CHKERR 8
|
||
#define RET_NOTSUPPORT 9
|
||
#define RET_INPUTERR 10
|
||
#define RET_EXIST 11
|
||
#define RET_FULL 12
|
||
#define RET_SENDERR 13
|
||
|
||
/* NETCONFIG_MODULE 0x00010000 ~ 0x0001ffff*/
|
||
#define RET_IPINVALID (uint)((uint)NETCONFIG_MODULE<<16|1)
|
||
#define RET_BRNAMEERR (uint)((uint)NETCONFIG_MODULE<<16|1)
|
||
|
||
|
||
/* 错误码描述 */
|
||
#define RET_ERROR_DISC \
|
||
{ \
|
||
{ RET_OK, "OK" }, \
|
||
{ RET_ERR, "Error" },\
|
||
{ RET_UNKNOWN, "Unkown" },\
|
||
{ RET_SYSERR, "SystemError" },\
|
||
{ RET_NOTFOUND, "NotFound" }, \
|
||
{ RET_TIMEOUT, "Timeout" }, \
|
||
{ RET_NULLP, "NullPointer" } ,\
|
||
{ RET_NOMEM, "NotEnoughMemery"},\
|
||
{ RET_CHKERR, "CheckError"},\
|
||
{ RET_NOTSUPPORT, "NotSupport"},\
|
||
{ RET_INPUTERR, "InputError"},\
|
||
{ RET_EXIST, "AlreadyExist"},\
|
||
{ RET_FULL, "Full"},\
|
||
{ RET_SENDERR, "SendErr"},\
|
||
{ RET_IPINVALID, "IpInvalid"},\
|
||
{ RET_BRNAMEERR, "BrNameInvalid"}\
|
||
}
|
||
|
||
#endif
|
||
|