Remove packet_analysis/Defines.h

- Replace uses of identifier_t with uint32_t
- Replace repeated usage of tuple type for Analysis results with type alias
This commit is contained in:
Tim Wojtulewicz 2020-07-16 13:52:04 -07:00
parent b46e600775
commit c2500d03d6
42 changed files with 66 additions and 80 deletions

View file

@ -10,7 +10,7 @@ EthernetAnalyzer::EthernetAnalyzer()
{
}
std::tuple<zeek::packet_analysis::AnalyzerResult, zeek::packet_analysis::identifier_t> EthernetAnalyzer::Analyze(Packet* packet)
zeek::packet_analysis::AnalysisResultTuple EthernetAnalyzer::Analyze(Packet* packet)
{
auto& pdata = packet->cur_pos;
auto end_of_data = packet->GetEndOfData();
@ -38,7 +38,7 @@ std::tuple<zeek::packet_analysis::AnalyzerResult, zeek::packet_analysis::identif
}
// Get protocol being carried from the ethernet frame.
identifier_t protocol = (pdata[12] << 8) + pdata[13];
uint32_t protocol = (pdata[12] << 8) + pdata[13];
packet->eth_type = protocol;
packet->l2_dst = pdata;

View file

@ -12,7 +12,7 @@ public:
EthernetAnalyzer();
~EthernetAnalyzer() override = default;
std::tuple<AnalyzerResult, identifier_t> Analyze(Packet* packet) override;
AnalysisResultTuple Analyze(Packet* packet) override;
static zeek::packet_analysis::AnalyzerPtr Instantiate()
{