about summary refs log tree commit diff
path: root/library/std/src/net/ip_addr.rs
AgeCommit message (Collapse)AuthorLines
2025-02-12std: replace the `FromInner` implementation for addresses with private ↵joboet-29/+0
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`.
2024-09-29Fix std tests for wasm32-wasip2 targetNicola Krumschmidt-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2023-02-26Move IpAddr and SocketAddr to coreLinus Färnstrand-2068/+7
2022-12-30Rollup merge of #104182 - gabhijit:ipv6-in6addr-any-doc-fix, r=m-ou-seMatthias Krüger-0/+9
`IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` documentation. Added documentation for IPv6 Addresses `IN6ADDR_ANY_INIT` also known as `in6addr_any` and `IN6ADDR_LOOPBACK_INIT` also known as `in6addr_loopback` similar to `INADDR_ANY` for IPv4 Addresses.
2022-11-13Remove unused diagnostic itemsMaybe Waffle-2/+0
2022-11-09`IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` documentation.Abhijit Gadgil-0/+9
Added documentation for IPv6 Addresses `IN6ADDR_ANY_INIT` also known as `in6addr_any` and `IN6ADDR_LOOPBACK_INIT` also known as `in6addr_loopback` similar to `INADDR_ANY` for IPv4 Addresses.
2022-09-12Simplify `clippy` fix.Markus Reiter-2/+0
2022-09-12Add `rustc_diagnostic_item` for IP addresses.Markus Reiter-0/+5
2022-09-12Flatten `net` module again.Markus Reiter-0/+2092