1 //-------------------------------------------------------------------------- 2 // Copyright (C) 2020-2021 Cisco and/or its affiliates. All rights reserved. 3 // 4 // This program is free software; you can redistribute it and/or modify it 5 // under the terms of the GNU General Public License Version 2 as published 6 // by the Free Software Foundation. You may not use, modify or distribute 7 // this program under any other version of the GNU General Public License. 8 // 9 // This program is distributed in the hope that it will be useful, but 10 // WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 // General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License along 15 // with this program; if not, write to the Free Software Foundation, Inc., 16 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 //-------------------------------------------------------------------------- 18 // opportunistic_tls_event.h author Steven Baigal <sbaigal@cisco.com> 19 20 #ifndef OPPORTUNISTIC_TLS_EVENT_H 21 #define OPPORTUNISTIC_TLS_EVENT_H 22 23 #include "framework/data_bus.h" 24 25 // An opportunistic SSL/TLS session will start from next packet 26 #define OPPORTUNISTIC_TLS_EVENT "service_inspector.opportunistic.tls" 27 28 namespace snort 29 { 30 31 class SO_PUBLIC OpportunisticTlsEvent : public snort::DataEvent 32 { 33 public: OpportunisticTlsEvent(const snort::Packet * p,const char * service)34 OpportunisticTlsEvent(const snort::Packet* p, const char* service) : 35 pkt(p), next_service(service) { } 36 get_packet()37 const snort::Packet* get_packet() override 38 { return pkt; } 39 get_next_service()40 const char* get_next_service() 41 { return next_service; } 42 43 private: 44 const snort::Packet* pkt; 45 const char* next_service = nullptr; 46 }; 47 48 } 49 50 #endif 51