mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
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:
parent
b46e600775
commit
c2500d03d6
42 changed files with 66 additions and 80 deletions
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue