Commit Graph
100 Commits
Author SHA1 Message Date
Nils Andreas Svee afb20b6625 fix(client): retry real backend startup on port races 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 995293676d feat(cli): handle interrupt as graceful shutdown 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 33e2b663b8 fix(client): report read-timeout restore failures 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 07d14328d3 fix(client): clarify duration negotiation rejection 2026-05-10 20:56:43 +07:00
Nils Andreas Svee f0823fa90b fix(proto): avoid mutating flags in HMAC helper 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 860594ebec fix(client): check probe scheduling arithmetic 2026-05-10 20:56:43 +07:00
Nils Andreas Svee b53e650c53 fix(client): handle sequence wrap in reply ordering 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 294d97a13d fix(client): reject invalid negotiated packet length 2026-05-10 20:56:43 +07:00
Nils Andreas Svee e3bb28c559 fix(client): validate packet length configuration 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 1a98858b7a fix(client): harden ancillary receive parsing 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 56d3a905ed fix(client): harden ancillary control message parsing 2026-05-10 20:56:43 +07:00
Nils Andreas Svee f9a639d73d feat(cli): expose kernel receive timestamp in machine output 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 9b5bb46210 feat(client): add Linux kernel receive timestamp metadata 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 231021fd40 feat(cli): expose receive metadata in machine output 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 212a6e7b35 test(client): cover receive metadata on reply events 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 1c7f0ea22f chore(client): refine unsafe code restrictions for Linux ancillary features
Transition from a global forbid to a scoped deny for unsafe code to accommodate necessary low-level operations in the Linux receive implementation.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 3ff6a07225 feat(client): add Linux ancillary receive metadata 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 40dc41dc39 feat(client): add receive datagram abstraction 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 25d5c1db1c feat(client): add receive metadata scaffold 2026-05-10 20:56:43 +07:00
Nils Andreas Svee ed62a5c80c test: refactor real backend support for reliable output capture 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 706e3bd1e1 test: make IPv6 socket option tests more robust 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 9e9b2d641f feat(cli): improve cli help text and unit test naming 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 2a11e77cfd chore: remove unused interop feature flag 2026-05-10 20:56:43 +07:00
Nils Andreas Svee d93e10ba45 feat(cli): add support for configuring outgoing TTL and hop limit
Introduce a `--ttl` flag to allow users to set the IPv4 TTL or IPv6 hop limit, providing control over packet lifespan and helping diagnose network topology issues.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee a80a5e2b7b test(client): rename DSCP smoke test to reflect specific behavior
Update the test name to clarify that it verifies DSCP configuration during the session open and close lifecycle.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 063214b83b feat(client): implement DSCP negotiation and socket traffic class application
Apply the negotiated DSCP value to the UDP socket after a successful session open and clear it before closing to support network-level quality of service. This change adds platform-specific socket option handling for IPv4 TOS and IPv6 Traffic Class.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee ab95489f20 test(client): add integration tests for packet length and server fill
Verify that the client correctly handles custom packet lengths and server fill negotiation to ensure protocol compliance and support for larger MTUs. Add validation to reject empty server fill strings during configuration.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee a4e2f3aef4 test(client): unify fake and real backend testing via BackendPeer
Introduce a BackendPeer abstraction to transparently switch between fake and real IRTT backends. This simplifies test logic by removing manual skip checks and providing a consistent interface for server lifecycle management.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 3d49f725ae test(client): add integration tests for compatibility with real IRTT backends
Introduce a mechanism to run tests against a live irtt binary to verify real-world protocol interoperability, including HMAC authentication and various timestamp modes.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 797120056e test(client): add comprehensive integration tests for HMAC authentication
Verify HMAC negotiation, session closure, and error handling for authenticated probes to ensure protocol security and reliability.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 3f33f630b2 test(client): split client tests into behavior-focused modules 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 48891f8b5a refactor(client): move internal client tests to a dedicated sub-module 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 8bd52f35fa refactor(cli): rename m8 compatibility terms to advanced protocol options 2026-05-10 20:56:43 +07:00
Nils Andreas Svee c80b108b6d test(cli): consolidate invalid argument parsing tests 2026-05-10 20:56:43 +07:00
Nils Andreas Svee e49e91c528 test: verify RTT equality when no timestamping is present 2026-05-10 20:56:43 +07:00
Nils Andreas Svee b5b6ecc69e refactor(test): extract RTT processing verification to helper function 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 2052417b6b test: update mock timestamp simulation in test support 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 3de92749e9 test(client): add integration tests for m8 compatibility 2026-05-10 20:56:43 +07:00
Nils Andreas Svee aa5209dd0a test(cli): expand test coverage for new CLI parameters 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 8aa8876dc5 feat(cli): add advanced negotiation and protocol options 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 8ecd113f04 feat(cli): add support for midpoint timestamps and received stats 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 880653a98d feat(client): implement protocol configuration validation 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 1d7c9d70ec feat(client): define constants and validation for DSCP and server fill 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 0a795379a7 test(client): validate parameter mapping from configuration 2026-05-10 20:56:43 +07:00
Nils Andreas Svee ab855338af test(proto): verify HMAC field placement in protocol packets 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 5831f4a3b5 test(proto): add unit tests for parameter encoding and decoding 2026-05-10 20:56:43 +07:00
Nils Andreas Svee cf65e88fa3 refactor(client): modularize duration restriction validation 2026-05-10 20:56:43 +07:00
Nils Andreas Svee b1451742b4 feat(cli): implement continuous statistics and summary suppression 2026-05-10 20:56:43 +07:00
Nils Andreas Svee b35bc50ca4 refactor(cli): enhance main loop and reply draining logic 2026-05-10 20:56:43 +07:00
Nils Andreas Svee ba5dd8abb5 feat(cli): add support for continuous mode with zero duration 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 9fd9ee2c3a refactor(client): improve session initialization and state access 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 54bb17ffd9 style(cli): rename machine output keys for clarity 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 4770d0d476 feat(cli): integrate StatsCollector into main execution loop 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 181b796e8d feat(cli): implement summary formatting for statistics 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 91a3e6f383 build(cli): add irtt-stats dependency and feature flag 2026-05-10 20:56:43 +07:00
Nils Andreas Svee f0121fa0fe feat(cli): add Human output mode and summary logic 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 2524f5d1b2 feat(client): drain late replies before closing session 2026-05-10 20:56:43 +07:00
Nils Andreas Svee ca99b752a6 feat(stats): bound sequence tracking in continuous mode 2026-05-10 20:56:43 +07:00
Nils Andreas Svee c345f4b549 fix(client): prune insertion order in TimedOutMap on removal 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 7d3a9f8da0 build(stats): add irtt-client dependency to irtt-stats 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 16c1af750c feat(stats): implement core statistics collection and aggregation 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 5d791d1fcd feat(client): emit EchoSent event with scheduling metadata 2026-05-10 20:56:43 +07:00
Nils Andreas Svee ab951a440a feat(client): track and handle late replies after timeout 2026-05-10 20:56:43 +07:00
Nils Andreas Svee f41f63b922 feat(client): implement SignedDuration for precise RTT tracking 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 5ef9a8a366 feat(client): record and report packet size in client events 2026-05-10 20:56:43 +07:00
Nils Andreas Svee a773a94a45 refactor(managed): ensure event hub disconnection on all exit paths
Wrap the client execution in a cleanup handler to guarantee that event hub subscriptions are disconnected regardless of whether the session completes successfully or returns an error.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 0a9054a51d test(managed): improve test reliability and coverage 2026-05-10 20:56:43 +07:00
Nils Andreas Svee a2d27b154b feat(managed): implement automatic cancellation on session drop 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 4da8f962d4 feat(managed): automatically unregister dropped event subscriptions 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 16b81eb867 refactor(managed): rename malformed events to warning_events 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 37e3f243eb feat(managed): export managed client modules 2026-05-10 20:56:43 +07:00
Nils Andreas Svee ffcbacd438 feat(managed): implement managed client runner 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 9a52a3f938 feat(managed): implement event hub for pub/sub communication 2026-05-10 20:56:43 +07:00
Nils Andreas Svee d9846b7868 feat(managed): implement thread-safe cancellation token 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 3f7afd4f7a feat(error): introduce worker panic and subscription disconnection errors 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 3ba4f56221 feat(client): add run status and packet count helpers 2026-05-10 20:56:43 +07:00
Nils Andreas Svee c5941d6383 refactor(cli): restrict test utilities to test module and expand value escaping
Move internal test helpers to the test module to clean up the public API and add support for escaping common whitespace characters in output values.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 49b48bdce2 perf(cli): use LineWriter for stdout to improve output responsiveness
Switch from BufWriter to LineWriter to ensure trace logs and events are flushed to the terminal immediately upon each line completion.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee be473d04ad docs(cli): add TODO for refining final drain duration logic
Document the need to derive the final drain period from client state rather than using a hardcoded guess.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee c65ba48e10 feat(cli): implement main execution loop and network I/O logic 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 510f307acc feat(cli): implement command-line argument parsing and event formatting 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 4b90187d1d chore(cli): add dependencies for CLI implementation 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 2715dcb5bd test(client): add regression tests for packet processing and RTT 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 5a9231505e refactor(probe): improve CompletedSet eviction logic using insertion order 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 0099ac799f fix(client): handle negative RTT and simplify sample generation 2026-05-10 20:56:43 +07:00
Nils Andreas Svee d212258707 feat(client): add specific warning kinds for dropped packets 2026-05-10 20:56:43 +07:00
Nils Andreas Svee b9fc4b9cee refactor(client): capture send timestamp before socket call
Record the send timestamp immediately before the socket operation to include local enqueue overhead in RTT measurements, providing more conservative latency data for consumers.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 1cc0d60eac refactor(client): unify production and test timing logic
Extract internal methods that accept an optional timestamp to eliminate code duplication between primary client logic and test helpers.
2026-05-10 20:56:43 +07:00
Nils Andreas Svee 4a35f5ba0f test(client): add regression tests for edge cases and correctness 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 9661ebc4a6 fix(client): allow partial one-way delay samples 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 548363ad05 fix(client): improve probe tracking and reply handling 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 7cbc30a3a2 refactor(client): dynamic receive buffer sizing based on negotiated parameters 2026-05-10 20:56:43 +07:00
Nils Andreas Svee cdf41f2a82 feat(client): add configuration validation and new error types 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 265618b97e refactor(client): use internal clock for timestamps and simplify probe signatures 2026-05-10 20:56:43 +07:00
Nils Andreas Svee abf4b8134c test(client): add comprehensive tests for Milestone 3 probing functionality 2026-05-10 20:56:43 +07:00
Nils Andreas Svee c373b957d5 feat(client): implement core echo probe sending and receiving logic 2026-05-10 20:56:43 +07:00
Nils Andreas Svee cebce832ff feat(client): define new event types and error variants for echo probes 2026-05-10 20:56:43 +07:00
Nils Andreas Svee df3edf9f1d feat(client): add configuration options for probe timing and budgets 2026-05-10 20:56:43 +07:00
Nils Andreas Svee b0dc1fb70c feat(client): implement PendingMap and CompletedSet for probe tracking 2026-05-10 20:56:43 +07:00
Nils Andreas Svee e33b9b3f3f refactor(client): rename ClientState to ClientPhase and introduce ActiveSession 2026-05-10 20:56:43 +07:00