9 releases

Uses old Rust 2015

0.4.0 Jun 19, 2020
0.3.4 Apr 6, 2020
0.3.3 Sep 15, 2017
0.3.2 Jul 5, 2017
0.2.0 Mar 15, 2016

#16 in #icmp

Download history 102/week @ 2024-07-24 81/week @ 2024-07-31 162/week @ 2024-08-07 98/week @ 2024-08-14 190/week @ 2024-08-21 93/week @ 2024-08-28 84/week @ 2024-09-04 91/week @ 2024-09-11 100/week @ 2024-09-18 172/week @ 2024-09-25 82/week @ 2024-10-02 216/week @ 2024-10-09 125/week @ 2024-10-16 217/week @ 2024-10-23 224/week @ 2024-10-30 128/week @ 2024-11-06

760 downloads per month
Used in 4 crates

MIT license

19KB
340 lines

liboping bindings for Rust: simple ICMP pings

This crate is a simple Rust binding for liboping, a library that implements basic ICMP ping functionality. These bindings allow a Rust program to send ping packets (possibly to multiple hosts in parallel) and enumerate the responses.

This crate also includes a very simple program rustping that uses the bindings to implement a barebones command-line ping utility.

This crate requires liboping to be installed on the system. If you do not have liboping, you can install it either from the above link, or using your system package manager. The crate looks for the appropriate linker flags using pkg-config, so for this crate to build correctly, pkg-config --libs liboping must return a meaningful result.

This crate was written by Chris Fallin <cfallin@c1f.net> and is released under the MIT license.

Documentation is available here, and the crate is available as oping on crates.io here.

NOTE: sending ping packets requires either running as root or setting a capability on your binary, at least on Linux. This is a restriction enforced by the system, not by this crate. To set the capability, run the following as root:

$ setcap cap_net_raw+ep $MY_BINARY    # allow binary to send ping packets

Dependencies

~0.4–330KB