Packet analysis cleanup.

This commit is contained in:
Jan Grashoefer 2020-09-22 15:07:41 +02:00 committed by Tim Wojtulewicz
parent 62562504d5
commit 8d834a1d89
7 changed files with 21 additions and 39 deletions

View file

@ -18,7 +18,8 @@ bool LinuxSLLAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pa
return false;
}
//TODO: Handle different ARPHRD_types
// Note: We assume to see an Ethertype and don't consider different ARPHRD_types
// (see https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL.html)
auto hdr = (const SLLHeader*)data;
uint32_t protocol = ntohs(hdr->protocol_type);