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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! # Pree
//!
//! A cross-platform network diagnostics and monitoring library for Rust applications.
//!
//! This crate provides standardized access to network information across Linux, macOS, and Windows:
//! - Socket enumeration and monitoring (TCP/UDP)
//! - Real-time traffic statistics and bandwidth monitoring
//! - DNS configuration access
//! - Routing table information
//! - Network interface discovery and stats
//!
//! ## Quick Start
//!
//! ```rust
//! use pree::{TcpSocket, UdpSocket, SocketConfig};
//!
//! // List all active TCP connections
//! let tcp_sockets = TcpSocket::list()?;
//! println!("Active TCP connections: {}", tcp_sockets.len());
//!
//! // Count UDP sockets
//! let udp_count = UdpSocket::count_active()?;
//! println!("Active UDP sockets: {}", udp_count);
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
//!
//! ## Features
//!
//! - `async` - Enable async/await support for streaming monitoring
//! - `serde` - Enable serialization support for all data structures
// Re-export core types and traits
pub use ;
pub use ;
// Interface monitoring (extends network-interface functionality)
use crateNetworkError;
pub use ;
// Socket enumeration
pub use SocketMonitor;
pub use SocketInfo;
pub use SocketConfig;
pub use TcpSocket;
pub use UdpSocket;
// Routing and DNS
pub use RouteEntry;
// Utility functions
pub use ;
// Optional async monitoring (behind feature flag)
// AsyncTrafficStream is not yet implemented
/// Result type for network operations
pub type NetworkResult<T> = Result;
/// Platform-specific implementation details
/// Platform-specific types
pub use *;
pub use *;