rust/library/std/src/net
joboet 80c60fe783
std: replace the FromInner implementation for addresses with private conversion functions
Having these implementation available crate-wide means that platforms not using sockets for their networking code have to stub out the libc definitions required to support them. This PR moves the conversions to private helper functions that are only available where actually needed.

I also fixed the signature of the function converting from a C socket address to a Rust one: taking a reference to a `sockaddr_storage` resulted in unsound usage inside  `LookupHost::next`, which could create a reference to a structure smaller than `sockaddr_storage`. Thus I've replaced the argument type with a pointer and made the function `unsafe`.
2025-02-12 14:13:35 +01:00
..
ip_addr Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
socket_addr Fix SocketAddrV6: Display tests 2023-06-14 15:21:15 -04:00
tcp Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
udp Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
ip_addr.rs std: replace the FromInner implementation for addresses with private conversion functions 2025-02-12 14:13:35 +01:00
mod.rs std: update internal uses of io::const_error! 2024-11-26 18:38:24 +01:00
socket_addr.rs std: replace the FromInner implementation for addresses with private conversion functions 2025-02-12 14:13:35 +01:00
tcp.rs std: move network code into sys 2025-02-02 19:12:06 +01:00
test.rs tests(std/net): remove outdated base_port calculation 2025-02-06 18:51:54 +08:00
udp.rs std: move network code into sys 2025-02-02 19:12:06 +01:00