Use big endian for IPv6

This commit is contained in:
Jackson Coxson
2025-01-26 23:34:37 -07:00
parent b226edc3bc
commit 3e8c028378
3 changed files with 10 additions and 10 deletions

2
Cargo.lock generated
View File

@@ -656,7 +656,7 @@ dependencies = [
[[package]] [[package]]
name = "idevice" name = "idevice"
version = "0.1.10" version = "0.1.11"
dependencies = [ dependencies = [
"async-recursion", "async-recursion",
"base64", "base64",

View File

@@ -2,7 +2,7 @@
name = "idevice" name = "idevice"
description = "A Rust library to interact with services on iOS devices." description = "A Rust library to interact with services on iOS devices."
authors = ["Jackson Coxson"] authors = ["Jackson Coxson"]
version = "0.1.10" version = "0.1.11"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
documentation = "https://docs.rs/idevice" documentation = "https://docs.rs/idevice"

View File

@@ -119,14 +119,14 @@ impl UsbmuxdConnection {
} }
IpAddr::V6(Ipv6Addr::new( IpAddr::V6(Ipv6Addr::new(
u16::from_le_bytes([addr[8], addr[9]]), u16::from_be_bytes([addr[8], addr[9]]),
u16::from_le_bytes([addr[10], addr[11]]), u16::from_be_bytes([addr[10], addr[11]]),
u16::from_le_bytes([addr[12], addr[13]]), u16::from_be_bytes([addr[12], addr[13]]),
u16::from_le_bytes([addr[14], addr[15]]), u16::from_be_bytes([addr[14], addr[15]]),
u16::from_le_bytes([addr[16], addr[17]]), u16::from_be_bytes([addr[16], addr[17]]),
u16::from_le_bytes([addr[18], addr[19]]), u16::from_be_bytes([addr[18], addr[19]]),
u16::from_le_bytes([addr[20], addr[21]]), u16::from_be_bytes([addr[20], addr[21]]),
u16::from_le_bytes([addr[22], addr[23]]), u16::from_be_bytes([addr[22], addr[23]]),
)) ))
} }
_ => { _ => {