7 unstable releases (3 breaking)
new 0.4.0 | Feb 18, 2025 |
---|---|
0.3.2 | Feb 18, 2025 |
0.2.1 | Feb 11, 2025 |
0.1.0 | Feb 10, 2025 |
#2027 in Network programming
575 downloads per month
Used in 2 crates
(via link-local-address)
37KB
708 lines
async-arp
async-arp
is an asynchronous Rust crate that provides a high-level client for interacting with the Address Resolution Protocol (ARP). It can be used to probe the presence of hosts in a network or send advanced, custom ARP requests. This crate is ideal for network diagnostics, monitoring, or any application requiring interaction with ARP.
Features
- Async & Extensible: Uses the Tokio runtime for efficient asynchronous networking, with plans to support other async runtimes or a runtime-agnostic implementation.
- Host Probing: Quickly probe for active devices in the network using ARP requests.
- Advanced Requests: Send custom ARP requests and interact with devices in more complex ways.
- ARP Caching: ARP responses are cached for a customizable duration, reducing redundant network requests.
- Retry capabilities: Improves reliability when probing hosts with intermittent responses.
- Unix-only: This crate is designed for Unix-based systems (Linux, macOS, BSD).
Documentation
You can find the documentation for this project, including examples, usage, and API reference, here:
- Documentation (generated by rustdoc)
Requirements
This library requires elevated privileges to access raw network interfaces. You can either:
-
Grant the program the
CAP_NET_RAW
capability (recommended):This allows the program to run without
sudo
while still being able to access raw network interfaces. It's a more secure option than running the entire program as root.To grant the necessary capability, use the following command:
sudo setcap cap_net_raw=eip /path/to/your/program
-
Run the program with sudo privileges
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Dependencies
~6–16MB
~201K SLoC