summaryrefslogtreecommitdiffhomepage
path: root/src/pkt/hoptab.rs
Commit message (Collapse)AuthorAgeFilesLines
* log: add debug!/info!/warn!/error! macros and refactor to use itdilluti0n2026-03-021-9/+5
|
* pkt: rename hoptab public API, drop _0 suffixdilluti0n2026-02-261-7/+7
|
* Add benchmark for pkt/hoptab, add feature bench for internal benchesdilluti0n2026-01-231-0/+35
|
* pkt: hoptab: add testsdilluti0n2026-01-231-0/+140
|
* pkt: hoptab: implement priority-based evictiondilluti0n2026-01-231-35/+120
| | | | | | | | | | | | | | | | | - Introduce `EvictPriority` enum. - Optimize `is_stale` and `evict_priority` by passing entry references to eliminate redundant memory loads. pkt: hoptab: derive stale age from CAP Replace the magic `64` threshold with `STALE_AGE = CAP >> 1` and make the stale check inclusive (`age >= STALE_AGE`). This keeps the eviction/staleness policy consistent when CAP changes and documents the intended half-table age cutoff. pkt: hoptab: add compile time assertion for CAP pkt: hoptab: add comments
* pkt: hoptab: fix find_hop occupancy checkdilluti0n2026-01-231-3/+49
| | | | | Use ST_OCCUPIED instead of ST_EMPTY to avoid skipping valid entries; add debug logs
* pkt: implement hop cache for --fake-autottldilluti0n2026-01-231-0/+245
- add pkt::hoptab: small fixed-size hash table keyed by IP (v4-mapped/v6) with TTL-based staleness + simple eviction - store (src_ip -> inferred hop) on SYN/ACK from :443 - lookup (dst_ip -> hop) when crafting fake ClientHello, fallback to --fake-ttl on miss - add PktView helpers: ttl(), saddr(), daddr()