Crate netinfo [−] [src]
This crate will group network usage per process. It uses a method similar to nethogs:
All packets will be captured and their source/destination address are then used to
match them to a process.
This matching process relies on the /proc file system, so it only works on Linux.
Because capturing the network traffic is not permittet for normal programs, you either have to run your binary as root or allow capturing with:
sudo setcap cap_net_raw,cap_net_admin=eip /path/to/your/bin
Modules
| error |
Contains netinfo-crate errors generated with "error-chain". |
Structs
| NetStatistics |
Contains detailed information on network usage on per attribute (pid, in/out, tcp/udp). |
| Netinfo |
This structure allows you to group network traffic by pid. |
| NetworkInterface |
Represents a network interface and its associated addresses |
Enums
| ConnectionType |
ConnectionType can be Incoming or Outgoing (do we have to reverse Connection or not?). |
| TransportType |
Udp, Tcp or other packet type on transport layer? |