You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aims to be optimal by using low-level OS APIs instead of command line utilities.
12
9
Provides unified interface and returns data structures which may have additional fields depending on platform.
13
10
11
+
This is a fork based on the [netstat](https://crates.io/crates/netstat) crate by [ivxvm](https://github.com/ivxvm).
12
+
14
13
## Example
15
14
16
15
```rust
@@ -42,9 +41,10 @@ fn main() {
42
41
43
42
## Details
44
43
45
-
- On Windows, library uses [GetExtendedTcpTable](https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getextendedtcptable) & [GetExtendedUdpTable](https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getextendedudptable) (iphlpapi)
46
-
- On Linux, it uses [NETLINK_INET_DIAG](http://manpages.ubuntu.com/manpages/bionic/en/man7/sock_diag.7.html) protocol and performs pid lookup by traversing `procfs`
47
-
- On OS X, it should ideally use `sysctls`, but currently just parses netstat output (proper impletemention is mostly done in unused modules under `src/integrations/osx` folder, it waits for contributors with mac to finish it)
44
+
- On Windows, this library library uses [GetExtendedTcpTable](https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getextendedtcptable) & [GetExtendedUdpTable](https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getextendedudptable) (iphlpapi),
45
+
with an option to use the older [GetTcpTable](https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-gettcptable) & [GeUdpTable](https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getudptable).
46
+
- On Linux, it uses [NETLINK_INET_DIAG](http://manpages.ubuntu.com/manpages/bionic/en/man7/sock_diag.7.html) protocol and performs pid lookup by traversing `procfs`.
47
+
- On OS X, it uses [proc_pidfdinfo](https://opensource.apple.com/source/xnu/xnu-1504.7.4/bsd/kern/proc_info.c.auto.html).
0 commit comments