1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// SPDX-License-Identifier: MIT
//! # `SeeHandshake`
//!
//! `seehandshake` is a passive TLS handshake observer for the terminal.
//!
//! This crate provides both a library (used by the `seehandshake` binary and
//! available for downstream consumers) and a binary. The library is organized
//! into loosely coupled modules that can be exercised independently of live
//! packet capture, which makes the parser and reassembly logic testable from
//! recorded byte fixtures.
//!
//! ## Modules
//!
//! - [`model`]: Shared, dependency-free data types (connection keys,
//! handshake info, TLS enumerations).
//! - [`parser`]: TLS record and handshake decoders.
//! - [`tracker`]: Per-connection state, TCP payload reassembly, stale
//! connection eviction.
//! - [`capture`]: The [`capture::PacketSource`] trait plus a libpcap-backed
//! live implementation.
//! - [`origin`]: Per-connection process attribution (Linux `/proc` walker).
//! - [`ui`]: Ratatui three-panel terminal interface.
//! - [`cli`]: Command-line argument definitions and top-level dispatch.
//! - [`error`]: The crate's [`error::Error`] type.
//!
//! ## Example
//!
//! Parsing a recorded TLS `ClientHello` without any network activity:
//!
//! ```no_run
//! use seehandshake::parser::parse_client_hello;
//!
//! let bytes: &[u8] = &[/* raw TLS record bytes */];
//! if let Ok(hello) = parse_client_hello(bytes) {
//! println!("SNI: {:?}", hello.sni);
//! }
//! ```
pub use ;