Kaynağa Gözat

tidy namespaces for scanner

master
Pete McNeil 4 yıl önce
ebeveyn
işleme
d122549f7e
2 değiştirilmiş dosya ile 4 ekleme ve 7 silme
  1. 2
    2
      scanner.cpp
  2. 2
    5
      scanner.hpp

+ 2
- 2
scanner.cpp Dosyayı Görüntüle



// 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.

+ 2
- 5
scanner.hpp Dosyayı Görüntüle

// 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

Loading…
İptal
Kaydet