netscli-core
The library behind netscli. If
you want the CLI, the TUI, the desktop app, or the MCP server, use the
netscli binary crate. This crate
is for building your own tools on top of the same primitives.
What's in here
- Host discovery (
DiscoverEngine) over a subnet via ARP cache and active probes. - Port scanning (
PortScanner) with configurable concurrency and per-connect timeouts. - DNS resolution (
resolve_a,resolve_aaaa, full record-type lookups) viahickory-resolver. - Ping (
PingScanner) with structured RTT summaries. - Network sweep (
SweepEngine) combining discovery and scanning. - Interface listing (
NetworkManager) with ARP neighbour tables and MAC vendor lookup (lookup_vendor) against a bundled gzipped IEEE OUI dataset. - Host inspection (
InspectEngine) combining ping + scan + DNS. - Live traffic stats (
NetworkMonitor) viasysinfo. - Optional packet capture (
PcapEngine) behind thepcapfeature flag. - SQLite persistence (
Database) for scan history and host labelling.
Quick example
use ;
async
Features
| Feature | Default | Purpose |
|---|---|---|
db |
off | Enables the Database type and SQLite persistence via sqlx + chrono. Pulls ~90 extra transitive crates, so library consumers who don't need scan history should leave this off. |
pcap |
off | Enables PcapEngine packet capture. Needs libpcap/Npcap at runtime. |
The netscli binary crate enables db by default (it uses Database
for scan history). Library consumers who only want the scan / DNS /
ARP primitives should add the dep with default-features = false.
OUI vendor data
The IEEE OUI vendor database ships embedded in the crate (~400 KB gzipped). Vendor lookups work with zero runtime setup. If you want to ship a newer or filtered dataset:
- Set
NETSCLI_OUI_PATHto a path pointing at.jsonor.json.gz. - Or place
oui.min.json.gznext to the executable.
On-disk paths take precedence over the embedded copy.
License
MIT