Rust Wake-on-LAN library [async fork] https://github.com/LesnyRumcajs/wakey
Go to file
dependabot[bot] 7661e1e84b
Bump Swatinem/rust-cache from 2.2.1 to 2.4.0 (#23)
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 2.2.1 to 2.4.0.
- [Release notes](https://github.com/Swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Swatinem/rust-cache/compare/v2.2.1...v2.4.0)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 10:13:58 +02:00
.github Bump Swatinem/rust-cache from 2.2.1 to 2.4.0 (#23) 2023-05-23 10:13:58 +02:00
wakey Prepare release v0.3 (#19) 2023-01-06 22:01:34 +01:00
wakey-wake Prepare release v0.3 (#19) 2023-01-06 22:01:34 +01:00
.gitignore added idea to gitignore 2019-02-03 16:48:08 +01:00
Cargo.toml use workspaces to reduce dependencies (#7) 2022-06-26 12:13:12 +02:00
CHANGELOG.md Prepare release v0.3 (#19) 2023-01-06 22:01:34 +01:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2022-06-24 11:49:51 +02:00
LICENSE Create LICENSE 2019-02-03 16:50:53 +01:00
README.md Prepare release v0.3 (#19) 2023-01-06 22:01:34 +01:00

Wakey

Rust Crates.io docs.rs

Library for managing Wake-on-LAN packets. It supports:

  • creating magic packets,
  • broadcasting them via UDP.

Usage

From string representation of MAC address and using defaults when broadcasting:

let wol = wakey::WolPacket::from_string(&mac_adress, sep)?;
if wol.send_magic().is_ok() {
    println!("Sent the magic packet.");
} else {
    println!("Failed to send the magic packet.");
}

Packets can also be constructed with raw bytes and sent from / to custom addresses:

use std::net::SocketAddr;

let wol = wakey::WolPacket::from_bytes(&[0x00, 0x01, 0x02, 0x03, 0x04, 0x05])?;
let src = SocketAddr::from(([0,0,0,0], 0));
let dst = SocketAddr::from(([255,255,255,255], 9));

wol.send_magic_to(src, dst)?;

Included binary

cargo run --bin wakey-wake 00:11:22:33:44:55