rustnet_core/lib.rs
1//! # rustnet-core
2//!
3//! The reusable network-analysis core of [RustNet](https://github.com/domcyrus/rustnet):
4//! packet parsing, protocol types, deep packet inspection (DPI), link-layer
5//! parsers, connection merging, and DNS / GeoIP / OUI lookups.
6//!
7//! This crate is platform-independent and capture-independent — it operates on
8//! byte slices and parsed structures, with no dependency on `libpcap`, raw
9//! sockets, or OS process tables. Raw packet capture and platform-specific
10//! process attribution live in the `rustnet` binary crate.
11//!
12//! ## Capabilities
13//!
14//! - **Packet parsing** for Ethernet, Linux SLL/SLL2, PKTAP, raw IP, and
15//! TUN/TAP link layers, plus IPv4/IPv6, TCP, UDP, ICMP, and IGMP.
16//! - **Deep packet inspection** for HTTP, HTTPS/TLS with SNI extraction,
17//! DNS, SSH, QUIC, NTP, mDNS, LLMNR, DHCP, SNMP, SSDP, NetBIOS, and more.
18//! - **Connection merging** — fold parsed packets into long-lived connection
19//! state with protocol-aware lifecycle tracking and TCP analytics.
20//! - **GeoIP** lookups against MaxMind GeoLite2 databases.
21//! - **Reverse DNS** with background async resolution and caching.
22//! - **OUI** vendor resolution and **service** name resolution (baked-in
23//! datasets).
24//!
25//! ## Layout
26//!
27//! All modules live under [`network`]. They are also re-exported at the crate
28//! root for convenience, so both `rustnet_core::network::types` and
29//! `rustnet_core::types` resolve to the same module.
30
31pub mod network;
32
33// Flat re-exports so external users can write `rustnet_core::types` instead of
34// `rustnet_core::network::types`. The `network` module remains the canonical
35// home and keeps internal `crate::network::*` paths working unchanged.
36pub use network::{
37 bogon, dns, dpi, geoip, interface_stats, link_layer, merge, oui, parser, protocol, services,
38 tracker, types,
39};