blob: 24bd411ab2a08658520bcff2c8e7e9415db0646c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
use nix::net::if_::*;
#[cfg(any(target_os = "android", target_os = "linux"))]
const LOOPBACK: &'static [u8] = b"lo";
#[cfg(not(any(target_os = "android", target_os = "linux")))]
const LOOPBACK: &'static [u8] = b"lo0";
#[test]
fn test_if_nametoindex() {
assert!(if_nametoindex(&LOOPBACK[..]).is_ok());
}
|