kennytm

Results 391 comments of kennytm

"For later" - perhaps it could recognize #3681 fields and automatically skip them as well. ```rust #[derive(From)] struct Foo { a: usize, // no #[from] needed, because all other fields...

I think the `::from_str()` impl should remain platform-agnostic and support just the numerical form `fe80::abcd:1234%2`. It is similar to that you can't parse `127.0.0.1:ssh` into a SocketAddr even if you...

> Parsing interface names in `core` doesn't really make sense, that's why I proposed making the parser extendable for `std` I don't think it makes sense to produce a different...

Oh also, while the zone ID is required to disambiguate non-global IPv6 address, it is never sent on the wire. An IPv6 packet does not contain the `scope_id` at all....

> If proper Ipv6 parsing is only added to `SockAddressV6` passing only IP addresses without a port is not possible e.g. for user input to a program and Ipv6 addresses...

> It seems that currently (Rust 1.86.0) even specifying a u32 scope ID in `SocketAddrV6` is not used when binding a listener. For example, specifying a scope ID that doesn't...

So I've checked the prior art for this, and the population of having the scope-id included into their equivalent `Ipv6Addr` is pretty much 50/50. | Library | `SocketAddrV6` equivalent |...

> the more "correct" option, which would be a breaking change: moving the zone ID to `std::net::Ipv6Addr` I don't think adding the scope-id to `Ipv6Addr` is a breaking change. *...

`ToSocketAddrs` with string input [just calls the system](https://github.com/rust-lang/rust/blob/ebd8557637b33cc09b6ee8273f3154d5d3af6a15/library/std/src/sys/net/connection/socket.rs#L319)'s `getaddrinfo(3)`, so it is the system calling `if_nametoindex` internally (after all this method is supposed to do DNS query converting `"example.com"` to...

@tliron it seems to me that what you want is just a wrapper of `if_nametoindex`, something like: ```rust // mod std::net pub fn parse_scope_id(name: &str) -> std::io::Result { if let...