1 //-------------------------------------------------------------------------- 2 // Copyright (C) 2014-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 // rpc_module.h author Russ Combs <rucombs@cisco.com> 20 21 #ifndef RPC_MODULE_H 22 #define RPC_MODULE_H 23 // Interface to the RPC decode service inspector 24 25 #include "framework/module.h" 26 27 #define GID_RPC_DECODE 106 28 29 #define RPC_FRAG_TRAFFIC 1 30 #define RPC_MULTIPLE_RECORD 2 31 #define RPC_LARGE_FRAGSIZE 3 32 #define RPC_INCOMPLETE_SEGMENT 4 33 #define RPC_ZERO_LENGTH_FRAGMENT 5 34 35 struct RpcStats; 36 37 extern THREAD_LOCAL RpcStats rdstats; 38 extern THREAD_LOCAL snort::ProfileStats rpcdecodePerfStats; 39 40 class RpcDecodeModule : public snort::Module 41 { 42 public: 43 RpcDecodeModule(); 44 get_gid()45 unsigned get_gid() const override 46 { return GID_RPC_DECODE; } 47 48 const snort::RuleMap* get_rules() const override; 49 const PegInfo* get_pegs() const override; 50 PegCount* get_counts() const override; 51 snort::ProfileStats* get_profile() const override; 52 get_usage()53 Usage get_usage() const override 54 { return INSPECT; } 55 is_bindable()56 bool is_bindable() const override 57 { return true; } 58 }; 59 60 #endif 61