about summary refs log tree commit diff
path: root/library/std/src/net/ip
AgeCommit message (Collapse)AuthorLines
2021-12-26Fix a pair of mistyped test cases in std::net::ipScallop Ye-2/+2
2021-12-14Fix a bunch of typosFrank Steffahn-1/+1
2021-10-21Rollup merge of #86984 - Smittyvb:ipv4-octal-zero, r=m-ou-seYuki Okushi-0/+8
Reject octal zeros in IPv4 addresses This fixes #86964 by rejecting octal zeros in IP addresses, such that `192.168.00.00000000` is rejected with a parse error, since having leading zeros in front of another zero indicates it is a zero written in octal notation, which is not allowed in the strict mode specified by RFC 6943 3.1.1. Octal rejection was implemented in #83652, but due to the way it was implemented octal zeros were still allowed.
2021-10-03Rollup merge of #86434 - CDirkx:ipv6-benchmarking, r=joshtriplettManish Goregaokar-32/+57
Add `Ipv6Addr::is_benchmarking` This PR adds the unstable method `Ipv6Addr::is_benchmarking`. This method is added for parity with `Ipv4Addr::is_benchmarking`, and I intend to use it in a future rework of `Ipv6Addr::is_global` (edit: #86634) to more accurately follow the [IANA Special Address Registry](https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml) (like is done in `Ipv4Addr::is_global`). With `Ipv6Addr::is_benchmarking` and `Ipv4Addr::is_benchmarking` now both existing, `IpAddr::is_benchmarking` is also added.
2021-07-08Disallow octal zeros in IPv4 addressesSmitty-0/+8
2021-06-19Remove `Ipv4Addr::is_ietf_protocol_assignment`Christiaan Dirkx-14/+3
2021-06-18Add `IpAddr::is_benchmarking`Christiaan Dirkx-3/+12
2021-06-18Add `Ipv6Addr::is_benchmarking`Christiaan Dirkx-29/+45
2021-06-09Remove `is_unicast_site_local`Christiaan Dirkx-11/+1
2021-05-30Remove `is_unicast_link_local_strict`Christiaan Dirkx-16/+2
2021-01-20Dont prefix 0x when `dbg!(ipv6)`Lzu Tao-0/+3
2020-11-26Move const ip in ui test to unit testDaiki Ihara-0/+6
2020-09-23Make delegation methods of `std::net::IpAddr` unstable constChristiaan Dirkx-0/+19
Make the following methods of `std::net::IpAddr` unstable const under the `const_ip` feature: - `is_unspecified` - `is_loopback` - `is_global` - `is_multicast` Also adds a test for these methods in a const context. Possible because these methods delegate to the inner `Ipv4Addr` or `Ipv6Addr`, which were made const, and the recent stabilization of const control flow. Part of #76205
2020-09-03Make `Ipv4Addr` and `Ipv6Addr` const tests unit tests under `library`Christiaan Dirkx-0/+109
These tests are about the standard library, not the compiler itself, thus should live in `library`, see #76268.
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-0/+811
Also doing fmt inplace as requested.