mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add optional packet filtered statistics for packet sources
This commit is contained in:
parent
8a23671b21
commit
ae3d6a4df0
6 changed files with 46 additions and 27 deletions
|
@ -3,6 +3,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <sys/types.h> // for u_char
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include "zeek/iosource/BPF_Program.h"
|
||||
|
@ -30,25 +31,28 @@ public:
|
|||
/**
|
||||
* Packets received by source after filtering (w/o drops).
|
||||
*/
|
||||
uint64_t received;
|
||||
uint64_t received = 0;
|
||||
|
||||
/**
|
||||
* Packets dropped by source.
|
||||
*/
|
||||
uint64_t dropped; // pkts dropped
|
||||
uint64_t dropped = 0; // pkts dropped
|
||||
|
||||
/**
|
||||
* Total number of packets on link before filtering.
|
||||
* Optional, can be left unset if not available.
|
||||
*/
|
||||
uint64_t link;
|
||||
uint64_t link = 0;
|
||||
|
||||
/**
|
||||
* Bytes received by source after filtering (w/o drops).
|
||||
*/
|
||||
uint64_t bytes_received;
|
||||
uint64_t bytes_received = 0;
|
||||
|
||||
Stats() { received = dropped = link = bytes_received = 0; }
|
||||
/**
|
||||
* Packets filtered by the packet source.
|
||||
*/
|
||||
std::optional<uint64_t> filtered;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue