about summary refs log tree commit diff
path: root/src/libstd/net/ip.rs
AgeCommit message (Collapse)AuthorLines
2018-11-10reduce list to functions callable in const ctx.Mazdak Farrokhzad-1/+1
2018-11-10constify parts of libstd.Mazdak Farrokhzad-4/+3
2018-08-21Rollup merge of #53213 - tmccombs:stable-ipconstructors, r=KodrAuskennytm-20/+5
Stabilize IP associated constants Fixes #44582
2018-08-14Stabilize IP associated constantsThayne McCombs-20/+5
Fixes #44582
2018-08-10Replace _.. with just .. in slice patternLinus Färnstrand-4/+4
2018-08-10Make use of match ergonomics in ip methodsLinus Färnstrand-36/+36
2018-08-10Use slice patterns to check IP octetsLinus Färnstrand-11/+14
2018-08-08Simplify Ipv6Addr::from(octets) to not use unsafeLinus Färnstrand-3/+1
2018-08-08Simplify is_broadcastLinus Färnstrand-2/+1
2018-08-08Add Ipv4Addr BROADCAST assoc constLinus Färnstrand-0/+18
2018-08-08Move IPs to assoc constsLinus Färnstrand-28/+20
2018-08-08Make Ipv{4,6}Addr::new const fnsLinus Färnstrand-20/+28
2018-04-01Auto merge of #49418 - frewsxcv:frewsxcv-network-order, r=TimNNbors-2/+80
Clarify network byte order conversions for integer / IP address conversions. Opened primarily to address https://github.com/rust-lang/rust/issues/48819. Also added a few other conversion docs/examples.
2018-03-28Clarify network byte order conversions for integer / IP address conversions.Corey Farwell-2/+80
Opened primarily to address https://github.com/rust-lang/rust/issues/48819.
2018-03-26Auto merge of #49101 - mark-i-m:stabilize_i128, r=nagisabors-2/+2
Stabilize 128-bit integers :tada: cc #35118 EDIT: This should be merged only after the following have been merged: - [x] https://github.com/rust-lang-nursery/compiler-builtins/pull/236 - [x] https://github.com/rust-lang/book/pull/1230
2018-03-26Fix a few moreMark Mansi-2/+2
2018-03-24Add backticksPhlosioneer-3/+3
2018-03-11Remove "and may change between Rust releases"Phlosioneer-3/+3
2018-03-11Document when types have OS-dependent sizesPhlosioneer-0/+9
As per issue #43601, types that can change size depending on the target operating system should say so in their documentation. I used this template when adding doc comments: The size of a(n) <name> struct may vary depending on the target operating system, and may change between Rust releases. For enums, I used "instance" instead of "struct".
2017-12-11Reject superfluous `::` in IPv6 addressesvarkor-0/+3
Fixes #46263.
2017-11-26fix NetBSDAriel Ben-Yehuda-1/+2
2017-09-14Add unstable attributes for Ipv?Addr constructors.J. Cliff Dyer-5/+17
2017-09-08Add feature gate to doctests.J. Cliff Dyer-0/+4
2017-09-07Close doc examples and trim whitespace.J. Cliff Dyer-1/+5
2017-09-07IP address convenience constructorsJ. Cliff Dyer-0/+68
2017-08-07Stop using URL shortener in docsOliver Middleton-1/+1
tidy will no longer complain about long lines containing links so there is no reason to use a URL shortener here.
2017-05-20Correct some stability versionsOliver Middleton-9/+9
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-03-27Addressed requested changes for PR #40838lukaramu-6/+3
* Fixed spelling ToSocketAddr -> ToSocketAddrs in module docs (which also fixes a link) * Added missing "when" before "interacting" in module docs * Changed SocketAddr's top-level docs to explicitly state what socket addresses consist of, making them more consistent with SocketAddrV4's and SocketAddrV6's docs * Changed "in C" -> "in C's `netinet/in.h`" * Changed wording in is_ipv4/is_ipv6 methods to ", `false` otherwise" * Add missing closing ` ``` ` in Ipv6Addr's examples * Removed "Errors" section in ToSocketAddrs' to_socket_addrs method as it was rather redundant
2017-03-26fix trailing whitespacelukaramu-1/+1
2017-03-26Expanded and added links to std::net::{SocketAddr,SocketAddrV4,SocketAddrV6} ↵lukaramu-1/+1
docs Part of #29363 Changed summary sentences of SocketAddr and IpAddr for consistency Linked to SocketAddrV4 and SocketAddrV6 from SocketAddr, moving explaination there Expanded top-level docs for SocketAddrV4 and SocketAddrV6, linking to some relevant IETF RFCs, and linking back to SocketAddr Changed some of the method summaries to third person as per RFC 1574; added links to IETF RFCs where appropriate
2017-03-26Expanded and added links to std::net::{IpAddr,Ipv4Addr,Ipv6Addr} docslukaramu-42/+160
Part of #29363 Expanded top-level documentation & linked to relevant IETF RFCs. Added a bunch of links (to true/false/Ipv4Addr/etc.) throughout the docs.
2017-03-26std::net docs: changed occurences of "RFC" to say "IETF RFC"lukaramu-24/+24
part of #29363
2017-03-16documented order of conversion between u32 an ipv4addrz1mvader-0/+2
2017-02-07Rollup merge of #39372 - seanmonstar:more-addr-froms, r=alexcrichtonCorey Farwell-0/+22
A few ergonomic From impls for SocketAddr/IpAddr My main motivation is removing things like this: `"127.0.0.1:3000".parse().unwrap()`. Instead, this now works: `SocketAddr::from(([127, 0, 0, 1], 3000))` or even `([127, 0, 0, 1], 3000).into())` when passing to a function.
2017-02-05Ipv6Addr <-> u128Clar Charr-4/+36
2017-01-31add From<(I, u16)> for SocketAddr where I: Into<IpAddr>Sean McArthur-2/+2
2017-01-28add From<[u8; n]> impls for IpAddrSean McArthur-0/+22
2017-01-25std: Stabilize APIs for the 1.16.0 releaseAlex Crichton-6/+2
This commit applies the stabilization/deprecations of the 1.16.0 release, as tracked by the rust-lang/rust issue tracker and the final-comment-period tag. The following APIs were stabilized: * `VecDeque::truncate` * `VecDeque::resize` * `String::insert_str` * `Duration::checked_{add,sub,div,mul}` * `str::replacen` * `SocketAddr::is_ipv{4,6}` * `IpAddr::is_ipv{4,6}` * `str::repeat` * `Vec::dedup_by` * `Vec::dedup_by_key` * `Result::unwrap_or_default` * `<*const T>::wrapping_offset` * `<*mut T>::wrapping_offset` * `CommandExt::creation_flags` (on Windows) * `File::set_permissions` * `String::split_off` The following APIs were deprecated * `EnumSet` - replaced with other ecosystem abstractions, long since unstable Closes #27788 Closes #35553 Closes #35774 Closes #36436 Closes #36949 Closes #37079 Closes #37087 Closes #37516 Closes #37827 Closes #37916 Closes #37966 Closes #38080
2017-01-19Auto merge of #38464 - clarcharr:ip_cmp, r=sfacklerbors-4/+100
PartialEq and PartialOrd between IpAddr and Ipv[46]Addr. PartialEq was rather useful, so, I figured that I'd implement it. I added PartialOrd for good measure.
2016-12-25Impl From<inner> for IpAddr and SocketAddr.Yamakaky-0/+2
Fixes https://github.com/rust-lang/rfcs/issues/1816.
2016-12-24Impl From<Ipv4Addr, Ipv6Addr> for IpAddr.Yamakaky-0/+12
Fixes https://github.com/rust-lang/rfcs/issues/1816.
2016-12-23Comparison between IpAddr and Ipv[46]Addr.Clar Charr-4/+100
2016-12-18From<[u16; 8]> for Ipv6Addr.Clar Charr-1/+27
2016-12-03Rollup merge of #38077 - GuillaumeGomez:ipaddr_doc, r=frewsxcvCorey Farwell-0/+88
Add missing examples for IpAddr enum r? @frewsxcv
2016-11-29Add missing examples for IpAddr enumGuillaume Gomez-0/+88
2016-11-23Add ::1 example in IPv6 to IPv4 conversionGuillaume Gomez-15/+44
2016-11-22Add missing examples for Ipv6AddrGuillaume Gomez-0/+129
2016-11-16Add examples for Ipv4AddrGuillaume Gomez-1/+124
2016-11-16Add missing urls and improve internal doc representationGuillaume Gomez-5/+19
2016-10-10Auto merge of #36707 - achanda:ip_type, r=alexcrichtonbors-0/+32
Add two functions to check type of given address The is_v4 function returns true if the given IP is v4. The is_v6 function returns true if the IP is v6.