#arp #async #networking #client #protocols #network-protocol

async-arp

An async ARP client library for probing hosts and sending advanced ARP requests

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

Download history 49/week @ 2025-02-04 526/week @ 2025-02-11

575 downloads per month
Used in 2 crates (via link-local-address)

MIT/Apache

37KB
708 lines

async-arp

GitHub license crates.io

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:

Requirements

This library requires elevated privileges to access raw network interfaces. You can either:

  1. 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
    
  2. Run the program with sudo privileges

License

Licensed under either of

Dependencies

~6–16MB
~201K SLoC