2022-05-10 06:43:27 +00:00
|
|
|
//
|
|
|
|
// Created by xajhu on 2021/6/30 0030.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef DAEMON_AGENT_INCLUDE_USER_ERRNO_H
|
|
|
|
#define DAEMON_AGENT_INCLUDE_USER_ERRNO_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-06-01 03:35:42 +00:00
|
|
|
#define USED_USER_ERRNO
|
|
|
|
|
2022-05-10 06:43:27 +00:00
|
|
|
typedef enum {
|
2022-06-01 03:35:42 +00:00
|
|
|
ERR_SUCCESS = 0,
|
|
|
|
ERR_INPUT_PARAMS = 1,
|
|
|
|
ERR_UN_SUPPORT = 3,
|
|
|
|
ERR_CALL_SHELL = 4,
|
|
|
|
ERR_ITEM_EXISTS = 5,
|
|
|
|
ERR_ITEM_UNEXISTS = 6,
|
|
|
|
ERR_SYS_INIT = 7,
|
2022-05-10 06:43:27 +00:00
|
|
|
|
|
|
|
// 文件读取相关错误
|
|
|
|
ERR_OPEN_FILE = 100,
|
|
|
|
ERR_READ_FILE = 101,
|
|
|
|
ERR_FILE_NOT_EXISTS = 102,
|
|
|
|
ERR_GET_FILE_SIZE = 103,
|
|
|
|
ERR_COPY_FILE = 104,
|
|
|
|
|
|
|
|
// 内存相关错误
|
|
|
|
ERR_MALLOC_MEMORY = 200,
|
|
|
|
|
|
|
|
// SSL EVP 加解密相关错误
|
|
|
|
ERR_EVP_KEY_SIZE = 200,
|
|
|
|
ERR_UNSUP_EVP_TYPE = 201,
|
|
|
|
ERR_EVP_INIT_KEY = 202,
|
|
|
|
ERR_EVP_UPDATE = 203,
|
|
|
|
ERR_EVP_FINALE = 204,
|
|
|
|
ERR_EVP_CREATE_CTX = 205,
|
|
|
|
ERR_AES128_KEYGEN = 206,
|
|
|
|
ERR_EVP_ENCRYPTION = 207,
|
|
|
|
ERR_EVP_DECRYPTION = 208,
|
|
|
|
|
|
|
|
// 业务相关错误
|
|
|
|
// 配置相关业务
|
|
|
|
ERR_CONFIG_INIT = 1000,
|
|
|
|
ERR_UNCOMPATIBILITY_TYPE = 1001,
|
|
|
|
ERR_STRING_TO_NUMBER = 1002,
|
|
|
|
ERR_UNKNOWN_CFG_ID = 1003,
|
|
|
|
|
|
|
|
// 日志系统相关业务
|
|
|
|
ERR_ZLOG_INIT = 2001,
|
|
|
|
|
|
|
|
// 硬件信息相关业务
|
|
|
|
ERR_SYS_GET_CPU_INFO = 2100,
|
|
|
|
ERR_SYS_NOT_FOUND_CPU = 2101,
|
|
|
|
ERR_SYS_DISK_GET_INFO = 2102,
|
|
|
|
ERR_SYS_IPMI_UNSUP = 2103,
|
|
|
|
ERR_SYS_SENSOR_GET_INFO = 2104,
|
|
|
|
|
|
|
|
// 数据库相关业务
|
|
|
|
ERR_DB_CONNECT = 2200,
|
|
|
|
|
|
|
|
// 消息队列相关错误
|
|
|
|
ERR_MQ_CREATE_MQ = 2300,
|
|
|
|
ERR_MQ_CREATE_REP = 2301,
|
|
|
|
ERR_MQ_BIND_SOCKET = 2302,
|
|
|
|
ERR_MQ_CONN_SERVER = 2304,
|
2022-06-15 10:08:19 +00:00
|
|
|
ERR_MQ_SEND_MSG = 2305,
|
2022-05-10 06:43:27 +00:00
|
|
|
|
|
|
|
// JSON 序列化相关错误
|
|
|
|
ERR_JSON_CREAT_OBJ = 2400,
|
|
|
|
|
2022-06-01 03:35:42 +00:00
|
|
|
// PPPoE 相关
|
|
|
|
ERR_CREATE_NETIF = 2500,
|
|
|
|
ERR_CREATE_PPPOE_NETIF = 2501,
|
|
|
|
ERR_CREATE_PPP_SESSION = 2502,
|
|
|
|
|
2022-06-10 09:03:27 +00:00
|
|
|
// MISC 相关
|
2022-06-15 10:08:19 +00:00
|
|
|
ERR_MISC_GET_IPADDR = 2600,
|
|
|
|
ERR_MISC_GET_NETMASK = 2601,
|
|
|
|
ERR_MISC_GET_GATEWAY = 2602,
|
|
|
|
ERR_MISC_GET_MACADDR = 2603,
|
2022-06-10 09:03:27 +00:00
|
|
|
|
2022-05-10 06:43:27 +00:00
|
|
|
} USER_ERRNO;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif//DAEMON_AGENT_INCLUDE_USER_ERRNO_H
|