Crates.io | arp-toolkit |
lib.rs | arp-toolkit |
version | 0.3.2 |
source | src |
created_at | 2021-05-27 21:23:30.423824 |
updated_at | 2023-07-30 09:17:24.347849 |
description | Toolkit for ARP and RARP using Raw sockets in Rust |
homepage | https://github.com/OliLay/arp-toolkit-rust |
repository | https://github.com/OliLay/arp-toolkit-rust |
max_upload_size | |
id | 402874 |
size | 21,490 |
Toolkit for (R)ARP , the (Reverse) Address Resolution Protocol
.
Supports simplified sending and receiving of (R)ARP requests/responses using an abstracted Client. Also allows easy manipulation and building of (R)ARP packets.
Features:
To build it, use
cargo build
Note: only the async-example
is built per default. To build the sync-example
, change to the directory and run cargo build
. This is because sync and async can not be used in the same crate simultaneously.
examples/sync-example
shows high-level usage of the class ArpClient
using blocking IO. For example, it illustrates how to get the MAC address for the corresponding IP and vice versa with a single function call. async-example
shows the same, but with async
IO.
It is also possible to directly send, receive and manipulate (R)ARP packages. To see how this works, take a look at the both of the examples and their containing method resolve_advanced
.
To use blocking IO instead of async IO, activate the feature sync
in your Cargo.toml
like this:
[dependencies]
arp-toolkit = {version = x.x.x, features = ["sync"]}
Important note: As this library uses Raw sockets, either set the CAP_NET_RAW
capability or run your program with sudo
. (not recommended)