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 publicly available functions for the FTPTelnet 23 * functionality for Snort. 24 * 25 * NOTES: 26 * - 16.09.04: Initial Development. SAS 27 * 28 * Steven A. Sturges <ssturges@sourcefire.com> 29 * Daniel J. Roelker <droelker@sourcefire.com> 30 * Marc A. Norton <mnorton@sourcefire.com> 31 */ 32 #ifndef FT_MAIN_H 33 #define FT_MAIN_H 34 35 #include "target_based/snort_protocols.h" 36 37 #include "ftpp_ui_config.h" 38 39 #define BUF_SIZE 1024 40 41 namespace snort 42 { 43 struct Packet; 44 struct SnortConfig; 45 } 46 47 #define FTP_CLIENT_NAME "ftp_client" 48 #define FTP_DATA_NAME "ftp_data" 49 #define FTP_SERVER_NAME "ftp_server" 50 51 extern SnortProtocolId ftp_data_snort_protocol_id; 52 53 void do_detection(snort::Packet*); 54 55 void CleanupFTPServerConf(void* serverConf); 56 void CleanupFTPCMDConf(void* ftpCmd); 57 void CleanupFTPBounceTo(void* ftpBounce); 58 59 int CheckFTPServerConfigs(snort::SnortConfig*, FTP_SERVER_PROTO_CONF*); 60 int FTPCheckConfigs(snort::SnortConfig*, void*); 61 62 FTP_CLIENT_PROTO_CONF* get_ftp_client(snort::Packet*); 63 FTP_SERVER_PROTO_CONF* get_ftp_server(snort::Packet*); 64 65 #endif 66 67