about summary refs log tree commit diff
path: root/library/core/tests/net
AgeCommit message (Collapse)AuthorLines
2025-01-26Put all coretests in a separate cratebjorn3-1499/+0
2025-01-20Recognise new IPv6 documentation range from RFC9637Bardi Harborow-0/+10
This commit adds the 3fff::/20 range defined by RFC9637 to those ranges which Ipv6Addr::is_documentation recognises as a documentation IP.
2024-10-13core/net: add Ipv[46]Addr::from_octets, Ipv6Addr::from_segmentsDario Nieuwenhuis-1/+23
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-20Add blank lines after module-level `//` comments.Nicholas Nethercote-0/+1
Similar to the previous commit.
2024-01-21Rollup merge of #119081 - jstasiak:is-ipv4-mapped, r=dtolnayNadrieril-1/+11
Add Ipv6Addr::is_ipv4_mapped This change consists of cherry-picking the content from the original PR[1], which got closed due to inactivity, and applying the following changes: * Resolving merge conflicts (obviously) * Linked to to_ipv4_mapped instead of to_ipv4 in the documentation (seems more appropriate) * Added the must_use and rustc_const_unstable attributes the original didn't have I think it's a reasonably useful method to have. [1] https://github.com/rust-lang/rust/pull/86490
2024-01-11apply fmtklensy-1/+5
2024-01-11Make is_global/is_unicast_global special address handling completeJakub Stasiak-2/+12
IANA explicitly documents 192.0.0.9/32, 192.0.0.9/32 and 2001:30::/28 as globally reachable[1][2] and the is_global implementations declare following IANA so let's make this happen. In case of 2002::/16 IANA says N/A so I think it's safe to say we shouldn't return true there either. [1] https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml [2] https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
2023-12-18Add Ipv6Addr::is_ipv4_mappedChristiaan Dirkx-1/+11
This change consists of cherry-picking the content from the original PR[1], which got closed due to inactivity, and applying the following changes: * Resolving merge conflicts (obviously) * Linked to to_ipv4_mapped instead of to_ipv4 in the documentation (seems more appropriate) * Added the must_use and rustc_const_unstable attributes the original didn't have I think it's a reasonably useful method. [1] https://github.com/rust-lang/rust/pull/86490
2023-10-15Add tests for `SocketAddrV6` ordering with scope_id and flowinfoMaybe Waffle-0/+11
2023-06-14Fix `SocketAddrV6: Display` testsltdk-1/+1
2023-06-14Fix `Ipv6Addr: Display` testsltdk-3/+3
2023-02-26Move IpAddr and SocketAddr to coreLinus Färnstrand-0/+1430