"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/managers/codec_manager.h" between
snort3-3.1.29.0.tar.gz and snort3-3.1.30.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

codec_manager.h  (snort3-3.1.29.0):codec_manager.h  (snort3-3.1.30.0)
skipping to change at line 32 skipping to change at line 32
#define MANAGERS_CODEC_MANAGER_H #define MANAGERS_CODEC_MANAGER_H
// Factory for Codecs. Runtime support is provided by PacketManager. // Factory for Codecs. Runtime support is provided by PacketManager.
#include <array> #include <array>
#include <vector> #include <vector>
#include "main/thread.h" #include "main/thread.h"
#include "protocols/protocol_ids.h" #include "protocols/protocol_ids.h"
#ifdef PIGLET
#include "framework/codec.h"
#endif
namespace snort namespace snort
{ {
class Codec; class Codec;
struct CodecApi; struct CodecApi;
class Module; class Module;
class PacketManager; class PacketManager;
struct ProfileStats; struct ProfileStats;
struct SnortConfig; struct SnortConfig;
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
extern THREAD_LOCAL snort::ProfileStats decodePerfStats; extern THREAD_LOCAL snort::ProfileStats decodePerfStats;
#ifdef PIGLET
struct CodecWrapper
{
CodecWrapper(const snort::CodecApi* a, snort::Codec* p) :
api { a }, instance { p } { }
~CodecWrapper()
{
if ( api && instance && api->dtor )
api->dtor(instance);
}
const snort::CodecApi* api;
snort::Codec* instance;
};
#endif
/* /*
* CodecManager class * CodecManager class
*/ */
class CodecManager class CodecManager
{ {
public: public:
friend class snort::PacketManager; friend class snort::PacketManager;
// global plugin initializer // global plugin initializer
static void add_plugin(const struct snort::CodecApi*); static void add_plugin(const struct snort::CodecApi*);
skipping to change at line 90 skipping to change at line 69
static void instantiate(); static void instantiate();
// destroy all global codec related information // destroy all global codec related information
static void release_plugins(); static void release_plugins();
// initialize the current threads DLT and Packet struct // initialize the current threads DLT and Packet struct
static void thread_init(const snort::SnortConfig*); static void thread_init(const snort::SnortConfig*);
// destroy thread_local data // destroy thread_local data
static void thread_term(); static void thread_term();
// print all of the codec plugins // print all of the codec plugins
static void dump_plugins(); static void dump_plugins();
#ifdef PIGLET
static CodecWrapper* instantiate(const char*, snort::Module*, snort::SnortCo
nfig*);
#endif
static uint8_t get_max_layers() static uint8_t get_max_layers()
{ return max_layers; } { return max_layers; }
private: private:
struct CodecApiWrapper; struct CodecApiWrapper;
static std::vector<CodecApiWrapper> s_codecs; static std::vector<CodecApiWrapper> s_codecs;
static std::array<ProtocolIndex, num_protocol_ids> s_proto_map; static std::array<ProtocolIndex, num_protocol_ids> s_proto_map;
static std::array<snort::Codec*, UINT8_MAX> s_protocols; static std::array<snort::Codec*, UINT8_MAX> s_protocols;
skipping to change at line 117 skipping to change at line 92
/* /*
* Private helper functions. These are all declared here * Private helper functions. These are all declared here
* because they need access to private variables. * because they need access to private variables.
*/ */
// Private struct defined in an anonymous namespace. // Private struct defined in an anonymous namespace.
static void instantiate(CodecApiWrapper&, snort::Module*, snort::SnortConfig *); static void instantiate(CodecApiWrapper&, snort::Module*, snort::SnortConfig *);
static CodecApiWrapper& get_api_wrapper(const snort::CodecApi* cd_api); static CodecApiWrapper& get_api_wrapper(const snort::CodecApi* cd_api);
static uint8_t get_codec(const char* const keyword); static uint8_t get_codec(const char* const keyword);
#ifdef PIGLET
static const snort::CodecApi* find_api(const char*);
#endif
}; };
#endif #endif
 End of changes. 4 change blocks. 
30 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)