mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Use constexpr instead of #define
This commit is contained in:
parent
269cc15888
commit
beb19905c2
2 changed files with 5 additions and 6 deletions
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
using namespace zeek::packet_analysis::PBB;
|
using namespace zeek::packet_analysis::PBB;
|
||||||
|
|
||||||
|
constexpr int PBB_LEN = 18;
|
||||||
|
constexpr int PBB_C_DST_OFF = 4;
|
||||||
|
constexpr int PBB_C_SRC_OFF = 10;
|
||||||
|
constexpr int PBB_ETYPE_OFF = 16;
|
||||||
|
|
||||||
PBBAnalyzer::PBBAnalyzer() : zeek::packet_analysis::Analyzer("PBB") { }
|
PBBAnalyzer::PBBAnalyzer() : zeek::packet_analysis::Analyzer("PBB") { }
|
||||||
|
|
||||||
bool PBBAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* packet)
|
bool PBBAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* packet)
|
||||||
|
|
|
@ -5,12 +5,6 @@
|
||||||
#include "zeek/packet_analysis/Analyzer.h"
|
#include "zeek/packet_analysis/Analyzer.h"
|
||||||
#include "zeek/packet_analysis/Component.h"
|
#include "zeek/packet_analysis/Component.h"
|
||||||
|
|
||||||
#define PBB_LEN 18u
|
|
||||||
#define PBB_C_DST_OFF 4u
|
|
||||||
#define PBB_C_SRC_OFF 10u
|
|
||||||
#define PBB_ETYPE_OFF 16u
|
|
||||||
|
|
||||||
|
|
||||||
namespace zeek::packet_analysis::PBB
|
namespace zeek::packet_analysis::PBB
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue