zeek/doc/frameworks/packet-analysis-2-llc.cc
Tim Wojtulewicz 0e46cc7a98 Run pre-commit on the imported docs files
This includes a minor change to the docs .typos.toml file to not change the
string 'tpe' to 'type'.
2025-09-26 02:59:07 +00:00

18 lines
482 B
C++

bool LLCDemo::AnalyzePacket(size_t len, const uint8_t* data, Packet* packet) {
// Rudimentary parsing of 802.2 LLC
if ( 17 >= len ) {
packet->Weird("truncated_llc_header");
return false;
}
if ( ! llc_demo_message )
return true;
auto dsap = data[14];
auto ssap = data[15];
auto control = data[16];
event_mgr.Enqueue(llc_demo_message, val_mgr->Count(dsap), val_mgr->Count(ssap), val_mgr->Count(control));
return true;
}