1 //-------------------------------------------------------------------------- 2 // Copyright (C) 2014-2021 Cisco and/or its affiliates. All rights reserved. 3 // Copyright (C) 2004-2013 Sourcefire, Inc. 4 // 5 // This program is free software; you can redistribute it and/or modify it 6 // under the terms of the GNU General Public License Version 2 as published 7 // by the Free Software Foundation. You may not use, modify or distribute 8 // this program under any other version of the GNU General Public License. 9 // 10 // This program is distributed in the hope that it will be useful, but 11 // WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 // General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License along 16 // with this program; if not, write to the Free Software Foundation, Inc., 17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 //-------------------------------------------------------------------------- 19 /* 20 * Description: 21 * 22 * This file defines the return codes for the FTPTelnet functions. 23 * 24 * Common return codes are defined here for all functions and libraries to 25 * use. This should make function error checking easier. 26 * 27 * NOTES: 28 * - 16.09.04: Initial Development. SAS 29 * 30 * Steven A. Sturges <ssturges@sourcefire.com> 31 * Daniel J. Roelker <droelker@sourcefire.com> 32 * Marc A. Norton <mnorton@sourcefire.com> 33 */ 34 35 #ifndef FTPP_RETURN_CODES_H 36 #define FTPP_RETURN_CODES_H 37 38 #define FTPP_SUCCESS 0 39 40 /* 41 * Non-fatal errors are positive 42 */ 43 #define FTPP_BOOL_TRUE 1 44 #define FTPP_NONFATAL_ERR 1 45 #define FTPP_OUT_OF_BOUNDS 2 46 47 #define FTPP_INVALID_PROTO 3 48 #define FTPP_NORMALIZED 4 49 #define FTPP_MALFORMED_FTP_RESPONSE 5 50 #define FTPP_ALERTED 6 51 #define FTPP_NON_DIGIT 7 52 #define FTPP_MALFORMED_IP_PORT 8 53 #define FTPP_PORT_ATTACK 9 54 55 #define FTPP_INVALID_SESSION 10 56 57 #define FTPP_OR_FOUND 100 58 #define FTPP_OPT_END_FOUND 101 59 #define FTPP_CHOICE_END_FOUND 102 60 61 /* 62 * Fatal errors are negative 63 */ 64 #define FTPP_FATAL_ERR (-1) 65 #define FTPP_INVALID_ARG (-2) 66 #define FTPP_MEM_ALLOC_FAIL (-3) 67 #define FTPP_NOT_FOUND (-4) 68 #define FTPP_INVALID_FILE (-5) 69 70 #define FTPP_ALERT (-6) 71 72 #define FTPP_INVALID_DATE (-100) 73 #define FTPP_INVALID_PARAM (-101) 74 75 #endif 76 77