From 5fd1ecc7960dbd02aef33a549f3f03a16398138f Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Fri, 17 Jul 2015 14:58:07 +0300 Subject: [PATCH] errno added; --- include/sntl/errno.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 include/sntl/errno.h diff --git a/include/sntl/errno.h b/include/sntl/errno.h new file mode 100644 index 0000000..0572936 --- /dev/null +++ b/include/sntl/errno.h @@ -0,0 +1,48 @@ +/* + * Secure Network Transport Layer Library v2 implementation. + * (sntllv2) it superseed all versions before due to the: + * - memory consumption + * - new features such as pulse emitting + * - performance optimization + * + * This is a proprietary software. See COPYING for further details. + * + * (c) Askele Group 2013-2015 + * + */ + +#ifndef __SNTL_ERRNO_H__ +#define __SNTL_ERRNO_H__ + +#define __SNTL_EPREFIX 200 + +#define SNE_SUCCESS 200 +#define SNE_FAILED 201 +#define SNE_ENOMEM 202 +#define SNE_BADPROTO 203 +#define SNE_ENORPC 204 +#define SNE_EPERM 205 +#define SNE_TOOLONG 206 +#define SNE_EBUSY 207 +#define SNE_WOULDBLOCK 208 +#define SNE_LINKERROR 209 +#define SNE_NOSUCHMSG 210 +#define SNE_NOSUCHCHAN 211 +#define SNE_ETIMEDOUT 212 +#define SNE_IGNORED 213 +#define SNE_REPLYREQ 214 +#define SNE_RAPIDMSG 215 + +/* some old errors for compatibility */ +#define ESXOREPLYREQ SNE_REPLYREQ /* protocol require reply with expression, + * or expression return for the request */ +#define ESXOTIMEDOUT SNE_ETIMEDOUT /* timedout */ +#define ESXRCBADPROT SNE_BADPROTO /* invalid protocol */ +#define ESXNOCONNECT SNE_LINKERROR /* connection is lost */ +#define ESXNOCHANSUP SNE_NOSUCHCHAN +#define ESXRAPIDREPLY SNE_RAPIDMSG + +const char *sntll_errno2cstr(int); + +#endif /* __SNTL_ERRNO_H__ */ +