ssh
Embed:
(wiki syntax)
Show/hide line numbers
error.h
00001 /* error.h 00002 * 00003 * Copyright (C) 2014-2016 wolfSSL Inc. 00004 * 00005 * This file is part of wolfSSH. 00006 * 00007 * wolfSSH is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * wolfSSH is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with wolfSSH. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 00022 /* 00023 * The error header file provides the error codes used in the library. 00024 */ 00025 00026 00027 #pragma once 00028 00029 #include <wolfssh/settings.h> 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 /* add new error strings to error.c */ 00036 00037 00038 /* main public return values */ 00039 enum WS_ErrorCodes { 00040 WS_SUCCESS = 0, /* function success */ 00041 WS_FATAL_ERROR = -1, /* general function failure */ 00042 WS_BAD_ARGUMENT = -2, /* bad function argument */ 00043 WS_MEMORY_E = -3, /* memory allocation failure */ 00044 WS_BUFFER_E = -4, /* input/output buffer size error */ 00045 WS_PARSE_E = -5, /* general parsing error */ 00046 WS_NOT_COMPILED = -6, /* feature not compiled in */ 00047 WS_OVERFLOW_E = -7, /* would overflow if continued */ 00048 WS_BAD_USAGE = -8, /* bad example usage */ 00049 WS_SOCKET_ERROR_E = -9, 00050 WS_WANT_READ = -10, 00051 WS_WANT_WRITE = -11, 00052 WS_RECV_OVERFLOW_E = -12, 00053 WS_VERSION_E = -13, /* Peer using wrong version of SSH */ 00054 WS_SEND_OOB_READ_E = -14, 00055 WS_INPUT_CASE_E = -15, 00056 WS_BAD_FILETYPE_E = -16, 00057 WS_UNIMPLEMENTED_E = -17, 00058 WS_RSA_E = -18, 00059 WS_BAD_FILE_E = -19, 00060 WS_INVALID_ALGO_ID = -20, 00061 WS_DECRYPT_E = -21, 00062 WS_ENCRYPT_E = -22, 00063 WS_VERIFY_MAC_E = -23, 00064 WS_CREATE_MAC_E = -24, 00065 WS_RESOURCE_E = -25, /* insufficient resources for new channel */ 00066 WS_INVALID_CHANTYPE = -26, /* invalid channel type */ 00067 WS_INVALID_CHANID = -27, 00068 WS_INVALID_USERNAME = -28, 00069 WS_CRYPTO_FAILED = -29, /* crypto action failed */ 00070 WS_INVALID_STATE_E = -30, 00071 WS_INVALID_PRIME_CURVE = -32, 00072 WS_ECC_E = -33, 00073 WS_CHANOPEN_FAILED = -34, 00074 WS_REKEYING = -90, /* Status: rekey in progress */ 00075 WS_CHANNEL_CLOSED = -91 /* Status: channel closed */ 00076 }; 00077 00078 00079 /* I/O Callback default errors */ 00080 enum WS_IOerrors { 00081 WS_CBIO_ERR_GENERAL = -1, /* general unexpected err */ 00082 WS_CBIO_ERR_WANT_READ = -2, /* need to call read again */ 00083 WS_CBIO_ERR_WANT_WRITE = -2, /* need to call write again */ 00084 WS_CBIO_ERR_CONN_RST = -3, /* connection reset */ 00085 WS_CBIO_ERR_ISR = -4, /* interrupt */ 00086 WS_CBIO_ERR_CONN_CLOSE = -5, /* connection closed or epipe */ 00087 WS_CBIO_ERR_TIMEOUT = -6 /* socket timeout */ 00088 }; 00089 00090 00091 #ifdef __cplusplus 00092 } 00093 #endif 00094
Generated on Tue Jul 12 2022 21:46:51 by 1.7.2