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 * Steven A. Sturges <ssturges@sourcefire.com> 21 * Daniel J. Roelker <droelker@sourcefire.com> 22 * Marc A. Norton <mnorton@sourcefire.com> 23 */ 24 25 #ifndef FTP_PARSE_H 26 #define FTP_PARSE_H 27 28 #include "ftpp_ui_config.h" 29 30 /* 31 * These are the definitions of the parser section delimiting 32 * keywords to configure FtpTelnet. When one of these keywords 33 * are seen, we begin a new section. 34 */ 35 #define TELNET "telnet" 36 #define FTP "ftp" 37 #define CLIENT "client" 38 #define SERVER "server" 39 40 /* 41 * Data type keywords 42 */ 43 #define START_CMD_FORMAT "<" 44 #define END_CMD_FORMAT ">" 45 #define F_INT "int" 46 #define F_NUMBER "number" 47 #define F_CHAR "char" 48 #define F_DATE "date" 49 #define F_LITERAL "'" 50 #define F_STRING "string" 51 #define F_STRING_FMT "formatted_string" 52 #define F_HOST_PORT "host_port" 53 #define F_LONG_HOST_PORT "long_host_port" 54 #define F_EXTD_HOST_PORT "extd_host_port" 55 56 int ProcessFTPCmdValidity( 57 FTP_SERVER_PROTO_CONF* ServerConf, 58 const char* cmd, const char* fmt, 59 char* ErrorString, int ErrStrLen); 60 61 int ProcessFTPAllowBounce( 62 FTP_CLIENT_PROTO_CONF* ClientConf, const uint8_t* addr, unsigned len, 63 Port low, Port high); 64 65 #endif 66 67