You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
294 B

use nix::net::if_::*;
#[cfg(any(target_os = "android", target_os = "linux"))]
const LOOPBACK: &[u8] = b"lo";
#[cfg(not(any(target_os = "android", target_os = "linux")))]
const LOOPBACK: &[u8] = b"lo0";
#[test]
fn test_if_nametoindex() {
assert!(if_nametoindex(&LOOPBACK[..]).is_ok());
}