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 19 // detection_module.h author Oleksandr Serhiienko <oserhiie@cisco.com> 20 // based on work by Russ Combs <rucombs@cisco.com> 21 22 #ifndef DETECTION_MODULE_H 23 #define DETECTION_MODULE_H 24 25 #include "framework/module.h" 26 27 namespace snort 28 { 29 class DetectionModule : public Module 30 { 31 public: 32 DetectionModule(); 33 34 bool set(const char*, Value&, SnortConfig*) override; 35 bool end(const char*, int, SnortConfig*) override; 36 get_pegs()37 const PegInfo* get_pegs() const override 38 { return pc_names; } 39 get_counts()40 PegCount* get_counts() const override 41 { return (PegCount*) &pc; } 42 get_usage()43 Usage get_usage() const override 44 { return GLOBAL; } 45 46 void set_trace(const Trace*) const override; 47 const TraceOption* get_trace_options() const override; 48 }; 49 } 50 51 #endif // DETECTION_MODULE_H 52