liarsping 0.1.0

A ping server which attempts to manipulate the ping times seen by the client
Documentation
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project

`liarsping` forges ICMP echo replies to make pings report shorter RTTs than reality. See `README.md` for what it does and how to run it. The design doc lives at `docs/superpowers/specs/2026-04-15-liarsping-polish-design.md`.

## Layout

- `src/main.rs` — thin clap entry point.
- `src/lib.rs` — module declarations.
- `src/config.rs` — clap `Args` and runtime `Config`.
- `src/detect.rs` — payload classification (timestamp vs sequence).
- `src/payload.rs` — Linux-ping timestamp shave with safe underflow.
- `src/state.rs` — per-sender table keyed by `(Ipv4Addr, identifier)`.
- `src/scheduler.rs` — min-heap of pending delayed replies.
- `src/run.rs` — main loop; the only socket-touching module.
- `src/preflight.rs` — startup warning when `icmp_echo_ignore_all == 0`.

## Build / test / run

```
cargo build
cargo test                       # all pure modules are unit-tested
sudo ./target/debug/liarsping    # raw ICMP needs CAP_NET_RAW
```

For a manual smoke test, set `sudo sysctl -w net.ipv4.icmp_echo_ignore_all=1`, run the binary, and `ping` from another host with `-v` to confirm the reported RTTs are shaved by roughly the configured amount.