GitXplorerGitXplorer
a

rust-ping

public
22 stars
19 forks
4 issues

Commits

List of commits on branch master.
Verified
024ea9eeb6e5c24687dd180e67e369e0c7b61ece

⚰️ removed unused import (#21)

eeuanwm committed 10 months ago
Unverified
94e8abb8516a6eea1fc5b4b067f73149d7c3e281

✅ Add dgram tests

aaisk committed a year ago
Unverified
c68eaaf75031f589d810bb4d53bfb123356fa831

🔖 bump version 0.5.2

aaisk committed a year ago
Unverified
2ea33e5efa67853372ed3afa30332ffe10d13101

🐛 Ignore the invalid UDP packet

aaisk committed a year ago
Verified
60eb2b399f7a85a86cdc792f311d8caf2ff4bc01

Make function std::ping::ping concurrency safe #7 (#19)

KKr0san89 committed a year ago
Verified
2759ee00a2ec1015cf5e2c4e1659266a74225112

✏️ fix typo in Cargo.toml (#18)

eeKristensen committed a year ago

README

The README file for this repository.

rust ping

Crates.io MIT licensed Docs

Ping function implemented in rust.

dgram sock and raw sock

Sending an ICMP package should create a socket of type raw on most platforms. And most of these platforms require special privileges. Basically, it needs to run with sudo on Linux to create a raw socket.

These requirements introduce security risks, so on modern platforms, unprivileged ping has been introduced, with socket type dgram. So there are two mods in this crate, rawsock and dgramsock, which have the same function ping. And the global ping function is just an alias for the rawsock::ping. You can pick the one which is suitable for your use case.

For Linux users, although modern kernels support ping with dgram, in some distributions (like Arch), it's disabled by default. More details: https://wiki.archlinux.org/title/sysctl#Allow_unprivileged_users_to_create_IPPROTO_ICMP_sockets

License

This library contains codes from https://github.com/knsd/tokio-ping, which is licensed under either of

And other codes is licensed under