Mitigator BPF API
Functions and types programs can use to filter packets.
Data Fields
TableExResult Struct Reference

Result of a lookup in the extended table. More...

#include <mitigator_bpf.h>

Data Fields

bool found
 
uint8_t reserved [3]
 
Time update_time
 

Detailed Description

Result of a lookup in the extended table.

Each program has an extended table to store 1M records by keys of TABLE_EX_KEY_SIZE bytes, each record holding a value of TABLE_EX_VALUE_SIZE bytes. Extended table may be slower than basic table.

Key of zero bytes only is reserved and forbidden. Value access is not guaranteed to be atomic.

Key mut have at least one bit set in bytes 8..15, so a four-byte IPv4 address is not a valid key, but struct NetAddr is, due to its layout.

Last update time is maintained for each record and stale records are purged, so there is no removal operation. To keep a record in the table, call table_ex_get() or table_ex_put().

Field Documentation

◆ found

bool TableExResult::found

Indicates if the record has been found.

◆ reserved

uint8_t TableExResult::reserved[3]

Reserved, do not use.

◆ update_time

Time TableExResult::update_time

Record update time maintained by the system.


The documentation for this struct was generated from the following file: