oden/third-party/vendor/nix-0.24.3/test/test_net.rs
2024-03-08 11:03:01 -08:00

12 lines
289 B
Rust

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());
}