Closed
Description
There is currently no way to specify a zone id (enp7s0 in this case)
Example:
use std::io::net::udp::UdpSocket;
use std::io::net::ip::{Ipv6Addr, SocketAddr};
fn main() {
// fe80::52e5:49ff:feba:bae8%enp7s0
let addr = SocketAddr { ip: Ipv6Addr(0xfe80, 0, 0, 0, 0x52e5, 0x49ff, 0xfeba, 0xbae8), port: 34254 };
let mut socket = match UdpSocket::bind(addr) {
Ok(s) => s,
Err(e) => fail!("couldn't bind socket: {}", e),
};
}
Error:
task '<main>' failed at 'couldn't bind socket: invalid argument (Invalid argument)', ipv6.rs:9
http://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices
Metadata
Metadata
Assignees
Labels
No labels