// Scanner::LoadRuleBase(RuleFileName, SecurityKey) | // Scanner::LoadRuleBase(RuleFileName, SecurityKey) | ||||
void Scanner::LoadRuleBase(string& RuleFileName, string& SecurityKey) { | |||||
void Scanner::LoadRuleBase(std::string& RuleFileName, std::string& SecurityKey) { | |||||
RuleBase.Load(RuleFileName); // Load the rulebase file. | RuleBase.Load(RuleFileName); // Load the rulebase file. | ||||
RuleBase.Validate(SecurityKey); // Validate the rulebase file. | RuleBase.Validate(SecurityKey); // Validate the rulebase file. | ||||
myEvaluationMatrix->EvaluateThis(IZ.GetByte()); | myEvaluationMatrix->EvaluateThis(IZ.GetByte()); | ||||
} | } | ||||
catch(FilterChain::Empty) { // We're expecting this so it's ok, but | |||||
catch(const FilterChain::Empty&) { // We're expecting this so it's ok, but | |||||
} // anything else will still be thrown! | } // anything else will still be thrown! | ||||
return myEvaluationMatrix; // Return our results. | return myEvaluationMatrix; // Return our results. |
// locate compound rules or parameter scans used to pick up tuning data from the | // locate compound rules or parameter scans used to pick up tuning data from the | ||||
// rulebase. | // rulebase. | ||||
#ifndef _MN_Scanner | |||||
#define _MN_Scanner | |||||
#pragma once | |||||
#include "FilterChain.hpp" | #include "FilterChain.hpp" | ||||
#include "snf_engine.hpp" | #include "snf_engine.hpp" | ||||
} | } | ||||
} | } | ||||
void LoadRuleBase(string& RuleFileName, string& SecurityKey); // Load & Validate RuleBase. | |||||
void LoadRuleBase(std::string& RuleFileName, std::string& SecurityKey); // Load & Validate RuleBase. | |||||
EvaluationMatrix* ScanMessage(unsigned char* MessageBuffer); // Scan with filter chain. | EvaluationMatrix* ScanMessage(unsigned char* MessageBuffer); // Scan with filter chain. | ||||
inline EvaluationMatrix* GetMatrix(){return myEvaluationMatrix;} // Return the latest matrix. | inline EvaluationMatrix* GetMatrix(){return myEvaluationMatrix;} // Return the latest matrix. | ||||
}; | }; | ||||
#endif |