2019-04-03 11:39:20 +00:00
|
|
|
use failure::*;
|
|
|
|
|
2019-04-23 10:44:56 +00:00
|
|
|
use std::u32;
|
2019-04-10 04:40:29 +00:00
|
|
|
use std::fs::OpenOptions;
|
2019-04-09 12:58:20 +00:00
|
|
|
use std::io::{BufRead, BufReader};
|
2019-04-10 09:28:50 +00:00
|
|
|
use std::collections::HashSet;
|
2019-04-12 11:21:21 +00:00
|
|
|
use std::process;
|
2019-04-23 10:44:56 +00:00
|
|
|
use std::net::{Ipv4Addr, Ipv6Addr};
|
2019-04-03 11:39:20 +00:00
|
|
|
use crate::tools;
|
|
|
|
use lazy_static::lazy_static;
|
|
|
|
use regex::Regex;
|
2019-04-04 15:08:30 +00:00
|
|
|
use libc;
|
|
|
|
|
|
|
|
/// POSIX sysconf call
|
|
|
|
pub fn sysconf(name: i32) -> i64 {
|
|
|
|
extern { fn sysconf(name: i32) -> i64; }
|
|
|
|
unsafe { sysconf(name) }
|
|
|
|
}
|
|
|
|
|
|
|
|
lazy_static! {
|
|
|
|
static ref CLOCK_TICKS: f64 = sysconf(libc::_SC_CLK_TCK) as f64;
|
|
|
|
}
|
2019-04-03 11:39:20 +00:00
|
|
|
|
|
|
|
pub struct ProcFsPidStat {
|
|
|
|
pub status: u8,
|
|
|
|
pub utime: u64,
|
|
|
|
pub stime: u64,
|
|
|
|
pub starttime: u64,
|
|
|
|
pub vsize: u64,
|
|
|
|
pub rss: i64,
|
|
|
|
}
|
|
|
|
|
2019-04-04 06:05:43 +00:00
|
|
|
pub fn read_proc_pid_stat(pid: libc::pid_t) -> Result<ProcFsPidStat, Error> {
|
2019-04-03 11:39:20 +00:00
|
|
|
|
|
|
|
let statstr = tools::file_read_firstline(format!("/proc/{}/stat", pid))?;
|
|
|
|
|
|
|
|
lazy_static! {
|
2019-04-04 07:25:19 +00:00
|
|
|
static ref REGEX: Regex = Regex::new(concat!(
|
|
|
|
r"^(?P<pid>\d+) \(.*\) (?P<status>\S) -?\d+ -?\d+ -?\d+ -?\d+ -?\d+ \d+ \d+ \d+ \d+ \d+ ",
|
|
|
|
r"(?P<utime>\d+) (?P<stime>\d+) -?\d+ -?\d+ -?\d+ -?\d+ -?\d+ 0 ",
|
|
|
|
r"(?P<starttime>\d+) (?P<vsize>\d+) (?P<rss>-?\d+) ",
|
|
|
|
r"\d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+ \d+ -?\d+ -?\d+ \d+ \d+ \d+"
|
|
|
|
)).unwrap();
|
2019-04-03 11:39:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if let Some(cap) = REGEX.captures(&statstr) {
|
2019-04-04 06:05:43 +00:00
|
|
|
if pid != cap["pid"].parse::<i32>().unwrap() {
|
2019-04-03 11:39:20 +00:00
|
|
|
bail!("unable to read pid stat for process '{}' - got wrong pid", pid);
|
|
|
|
}
|
|
|
|
|
2019-04-24 09:49:41 +00:00
|
|
|
return Ok(ProcFsPidStat {
|
|
|
|
status: cap["status"].as_bytes()[0],
|
|
|
|
utime: cap["utime"].parse::<u64>().unwrap(),
|
|
|
|
stime: cap["stime"].parse::<u64>().unwrap(),
|
|
|
|
starttime: cap["starttime"].parse::<u64>().unwrap(),
|
|
|
|
vsize: cap["vsize"].parse::<u64>().unwrap(),
|
|
|
|
rss: cap["rss"].parse::<i64>().unwrap() * 4096,
|
|
|
|
});
|
2019-04-03 11:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bail!("unable to read pid stat for process '{}'", pid);
|
|
|
|
}
|
|
|
|
|
2019-04-04 06:05:43 +00:00
|
|
|
pub fn read_proc_starttime(pid: libc::pid_t) -> Result<u64, Error> {
|
2019-04-03 11:39:20 +00:00
|
|
|
|
|
|
|
let info = read_proc_pid_stat(pid)?;
|
|
|
|
|
|
|
|
Ok(info.starttime)
|
|
|
|
}
|
2019-04-04 11:28:14 +00:00
|
|
|
|
|
|
|
pub fn check_process_running(pid: libc::pid_t) -> Option<ProcFsPidStat> {
|
|
|
|
if let Ok(info) = read_proc_pid_stat(pid) {
|
2019-04-24 09:49:41 +00:00
|
|
|
if info.status != 'Z' as u8 {
|
|
|
|
return Some(info);
|
|
|
|
}
|
2019-04-04 11:28:14 +00:00
|
|
|
}
|
|
|
|
None
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn check_process_running_pstart(pid: libc::pid_t, pstart: u64) -> Option<ProcFsPidStat> {
|
|
|
|
if let Some(info) = check_process_running(pid) {
|
2019-04-24 09:49:41 +00:00
|
|
|
if info.starttime == pstart {
|
|
|
|
return Some(info);
|
|
|
|
}
|
2019-04-04 11:28:14 +00:00
|
|
|
}
|
|
|
|
None
|
|
|
|
}
|
2019-04-04 15:08:30 +00:00
|
|
|
|
|
|
|
pub fn read_proc_uptime() -> Result<(f64, f64), Error> {
|
2019-04-12 09:52:43 +00:00
|
|
|
let path = "/proc/uptime";
|
|
|
|
let line = tools::file_read_firstline(&path)?;
|
2019-04-04 15:08:30 +00:00
|
|
|
let mut values = line.split_whitespace().map(|v| v.parse::<f64>());
|
|
|
|
|
|
|
|
match (values.next(), values.next()) {
|
2019-04-24 09:49:41 +00:00
|
|
|
(Some(Ok(up)), Some(Ok(idle))) => return Ok((up, idle)),
|
|
|
|
_ => bail!("Error while parsing '{}'", path),
|
2019-04-04 15:08:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn read_proc_uptime_ticks() -> Result<(u64, u64), Error> {
|
|
|
|
let (mut up, mut idle) = read_proc_uptime()?;
|
|
|
|
up *= *CLOCK_TICKS;
|
|
|
|
idle *= *CLOCK_TICKS;
|
|
|
|
Ok((up as u64, idle as u64))
|
|
|
|
}
|
2019-04-09 12:58:20 +00:00
|
|
|
|
|
|
|
#[derive(Debug)]
|
2019-04-12 09:52:43 +00:00
|
|
|
pub struct ProcFsMemInfo {
|
2019-04-09 12:58:20 +00:00
|
|
|
pub memtotal: u64,
|
|
|
|
pub memfree: u64,
|
|
|
|
pub memused: u64,
|
|
|
|
pub memshared: u64,
|
|
|
|
pub swaptotal: u64,
|
|
|
|
pub swapfree: u64,
|
|
|
|
pub swapused: u64,
|
|
|
|
}
|
|
|
|
|
2019-04-12 09:52:43 +00:00
|
|
|
pub fn read_meminfo() -> Result<ProcFsMemInfo, Error> {
|
2019-04-09 12:58:20 +00:00
|
|
|
let path = "/proc/meminfo";
|
|
|
|
let file = OpenOptions::new().read(true).open(&path)?;
|
|
|
|
|
2019-04-12 09:52:43 +00:00
|
|
|
let mut meminfo = ProcFsMemInfo {
|
2019-04-24 09:49:41 +00:00
|
|
|
memtotal: 0,
|
|
|
|
memfree: 0,
|
|
|
|
memused: 0,
|
|
|
|
memshared: 0,
|
|
|
|
swaptotal: 0,
|
|
|
|
swapfree: 0,
|
|
|
|
swapused: 0,
|
2019-04-09 12:58:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
let (mut buffers, mut cached) = (0, 0);
|
|
|
|
for line in BufReader::new(&file).lines() {
|
2019-04-24 09:49:41 +00:00
|
|
|
let content = line?;
|
|
|
|
let mut content_iter = content.split_whitespace();
|
|
|
|
if let (Some(key), Some(value)) = (content_iter.next(), content_iter.next()) {
|
|
|
|
match key {
|
|
|
|
"MemTotal:" => meminfo.memtotal = value.parse::<u64>()? * 1024,
|
|
|
|
"MemFree:" => meminfo.memfree = value.parse::<u64>()? * 1024,
|
|
|
|
"SwapTotal:" => meminfo.swaptotal = value.parse::<u64>()? * 1024,
|
|
|
|
"SwapFree:" => meminfo.swapfree = value.parse::<u64>()? * 1024,
|
|
|
|
"Buffers:" => buffers = value.parse::<u64>()? * 1024,
|
|
|
|
"Cached:" => cached = value.parse::<u64>()? * 1024,
|
|
|
|
_ => continue,
|
|
|
|
}
|
|
|
|
}
|
2019-04-09 12:58:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
meminfo.memfree += buffers + cached;
|
|
|
|
meminfo.memused = meminfo.memtotal - meminfo.memfree;
|
|
|
|
|
|
|
|
meminfo.swapused = meminfo.swaptotal - meminfo.swapfree;
|
|
|
|
|
|
|
|
let spages_line = tools::file_read_firstline("/sys/kernel/mm/ksm/pages_sharing")?;
|
|
|
|
meminfo.memshared = spages_line.trim_end().parse::<u64>()? * 4096;
|
|
|
|
|
|
|
|
Ok(meminfo)
|
|
|
|
}
|
2019-04-10 09:28:50 +00:00
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
pub struct ProcFsCPUInfo {
|
|
|
|
pub user_hz: f64,
|
|
|
|
pub mhz: f64,
|
|
|
|
pub model: String,
|
|
|
|
pub hvm: bool,
|
|
|
|
pub sockets: usize,
|
|
|
|
pub cpus: usize,
|
|
|
|
}
|
|
|
|
|
|
|
|
static CPU_INFO: Option<ProcFsCPUInfo> = None;
|
|
|
|
|
|
|
|
pub fn read_cpuinfo() -> Result<ProcFsCPUInfo, Error> {
|
|
|
|
if let Some(cpu_info) = &CPU_INFO { return Ok(cpu_info.clone()); }
|
|
|
|
|
|
|
|
let path = "/proc/cpuinfo";
|
|
|
|
let file = OpenOptions::new().read(true).open(&path)?;
|
|
|
|
|
|
|
|
let mut cpuinfo = ProcFsCPUInfo {
|
2019-04-24 09:49:41 +00:00
|
|
|
user_hz: *CLOCK_TICKS,
|
|
|
|
mhz: 0.0,
|
|
|
|
model: String::new(),
|
|
|
|
hvm: false,
|
|
|
|
sockets: 0,
|
|
|
|
cpus: 0,
|
2019-04-10 09:28:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
let mut socket_ids = HashSet::new();
|
|
|
|
for line in BufReader::new(&file).lines() {
|
2019-04-24 09:49:41 +00:00
|
|
|
let content = line?;
|
|
|
|
if content.is_empty() { continue; }
|
|
|
|
let mut content_iter = content.split(":");
|
|
|
|
match (content_iter.next(), content_iter.next()) {
|
|
|
|
(Some(key), Some(value)) => {
|
|
|
|
match key.trim_end() {
|
|
|
|
"processor" => cpuinfo.cpus += 1,
|
|
|
|
"model name" => cpuinfo.model = value.trim().to_string(),
|
|
|
|
"cpu MHz" => cpuinfo.mhz = value.trim().parse::<f64>()?,
|
|
|
|
"flags" => cpuinfo.hvm = value.contains(" vmx ") || value.contains(" svm "),
|
|
|
|
"physical id" => {
|
|
|
|
let id = value.trim().parse::<u8>()?;
|
|
|
|
socket_ids.insert(id);
|
|
|
|
},
|
|
|
|
_ => continue,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
_ => bail!("Error while parsing '{}'", path),
|
|
|
|
}
|
2019-04-10 09:28:50 +00:00
|
|
|
}
|
|
|
|
cpuinfo.sockets = socket_ids.len();
|
|
|
|
|
|
|
|
Ok(cpuinfo)
|
|
|
|
}
|
2019-04-12 11:21:21 +00:00
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct ProcFsMemUsage {
|
|
|
|
pub size: u64,
|
|
|
|
pub resident: u64,
|
|
|
|
pub shared: u64,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn read_memory_usage() -> Result<ProcFsMemUsage, Error> {
|
|
|
|
let path = format!("/proc/{}/statm", process::id());
|
|
|
|
let line = tools::file_read_firstline(&path)?;
|
|
|
|
let mut values = line.split_whitespace().map(|v| v.parse::<u64>());
|
|
|
|
|
|
|
|
let ps = 4096;
|
|
|
|
match (values.next(), values.next(), values.next()) {
|
2019-04-24 09:49:41 +00:00
|
|
|
(Some(Ok(size)), Some(Ok(resident)), Some(Ok(shared))) =>
|
|
|
|
Ok(ProcFsMemUsage {
|
|
|
|
size: size * ps,
|
|
|
|
resident: resident * ps,
|
|
|
|
shared: shared * ps,
|
|
|
|
}),
|
|
|
|
_ => bail!("Error while parsing '{}'", path),
|
2019-04-12 11:21:21 +00:00
|
|
|
}
|
|
|
|
}
|
2019-04-12 11:21:22 +00:00
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct ProcFsNetDev {
|
|
|
|
pub device: String,
|
|
|
|
pub receive: u64,
|
|
|
|
pub send: u64,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn read_proc_net_dev() -> Result<Vec<ProcFsNetDev>, Error> {
|
|
|
|
let path = "/proc/net/dev";
|
|
|
|
let file = OpenOptions::new().read(true).open(&path)?;
|
|
|
|
|
|
|
|
let mut result = Vec::new();
|
|
|
|
for line in BufReader::new(&file).lines().skip(2) {
|
2019-04-24 09:49:41 +00:00
|
|
|
let content = line?;
|
|
|
|
let mut iter = content.split_whitespace();
|
|
|
|
match (iter.next(), iter.next(), iter.skip(7).next()) {
|
|
|
|
(Some(device), Some(receive), Some(send)) => {
|
|
|
|
result.push(ProcFsNetDev {
|
|
|
|
device: device[..device.len()-1].to_string(),
|
|
|
|
receive: receive.parse::<u64>()?,
|
|
|
|
send: send.parse::<u64>()?,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
_ => bail!("Error while parsing '{}'", path),
|
|
|
|
}
|
2019-04-12 11:21:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(result)
|
|
|
|
}
|
2019-04-15 08:48:43 +00:00
|
|
|
|
|
|
|
fn hex_nibble(c: u8) -> Result<u8, Error> {
|
|
|
|
Ok(match c {
|
2019-04-24 09:49:41 +00:00
|
|
|
b'0'..=b'9' => c - b'0',
|
|
|
|
b'a'..=b'f' => c - b'a' + 0xa,
|
|
|
|
b'A'..=b'F' => c - b'A' + 0xa,
|
|
|
|
_ => bail!("not a hex digit: {}", c as char),
|
2019-04-15 08:48:43 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
fn hexstr_to_ipv4addr<T: AsRef<[u8]>>(hex: T) -> Result<Ipv4Addr, Error> {
|
|
|
|
let hex = hex.as_ref();
|
|
|
|
if hex.len() != 8 {
|
2019-04-24 09:49:41 +00:00
|
|
|
bail!("Error while converting hex string to IPv4 address: unexpected string length");
|
2019-04-15 08:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
let mut addr: [u8; 4] = unsafe { std::mem::uninitialized() };
|
|
|
|
for i in 0..4 {
|
2019-04-24 09:49:41 +00:00
|
|
|
addr[3 - i] = (hex_nibble(hex[i * 2])? << 4) + hex_nibble(hex[i * 2 + 1])?;
|
2019-04-15 08:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(Ipv4Addr::from(addr))
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct ProcFsNetRoute {
|
|
|
|
pub dest: Ipv4Addr,
|
|
|
|
pub gateway: Ipv4Addr,
|
|
|
|
pub mask: Ipv4Addr,
|
|
|
|
pub metric: u32,
|
|
|
|
pub mtu: u32,
|
|
|
|
pub iface: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn read_proc_net_route() -> Result<Vec<ProcFsNetRoute>, Error> {
|
|
|
|
let path = "/proc/net/route";
|
|
|
|
let file = OpenOptions::new().read(true).open(&path)?;
|
|
|
|
|
|
|
|
let mut result = Vec::new();
|
|
|
|
for line in BufReader::new(&file).lines().skip(1) {
|
2019-04-24 09:49:41 +00:00
|
|
|
let content = line?;
|
|
|
|
if content.is_empty() { continue; }
|
|
|
|
let mut iter = content.split_whitespace();
|
|
|
|
|
|
|
|
let mut next = || iter.next()
|
|
|
|
.ok_or(format_err!("Error while parsing '{}'", path));
|
|
|
|
|
|
|
|
let (iface, dest, gateway) = (next()?, next()?, next()?);
|
|
|
|
for _ in 0..3 { next()?; }
|
|
|
|
let (metric, mask, mtu) = (next()?, next()?, next()?);
|
|
|
|
|
|
|
|
result.push(ProcFsNetRoute {
|
|
|
|
dest: hexstr_to_ipv4addr(dest)?,
|
|
|
|
gateway: hexstr_to_ipv4addr(gateway)?,
|
|
|
|
mask: hexstr_to_ipv4addr(mask)?,
|
|
|
|
metric: metric.parse()?,
|
|
|
|
mtu: mtu.parse()?,
|
|
|
|
iface: iface.to_string(),
|
|
|
|
});
|
2019-04-15 08:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(result)
|
|
|
|
}
|
2019-04-23 10:44:56 +00:00
|
|
|
|
|
|
|
fn hexstr_to_ipv6addr<T: AsRef<[u8]>>(hex: T) -> Result<Ipv6Addr, Error> {
|
|
|
|
let hex = hex.as_ref();
|
|
|
|
if hex.len() != 32 {
|
2019-04-24 09:49:41 +00:00
|
|
|
bail!("Error while converting hex string to IPv6 address: unexpected string length");
|
2019-04-23 10:44:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
let mut addr: [u8; 16] = unsafe { std::mem::uninitialized() };
|
|
|
|
for i in 0..16 {
|
2019-04-24 09:49:41 +00:00
|
|
|
addr[i] = (hex_nibble(hex[i * 2])? << 4) + hex_nibble(hex[i * 2 + 1])?;
|
2019-04-23 10:44:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(Ipv6Addr::from(addr))
|
|
|
|
}
|
|
|
|
|
|
|
|
fn hexstr_to_u8<T: AsRef<[u8]>>(hex: T) -> Result<u8, Error> {
|
|
|
|
let hex = hex.as_ref();
|
|
|
|
if hex.len() != 2 {
|
2019-04-24 09:49:41 +00:00
|
|
|
bail!("Error while converting hex string to u8: unexpected string length");
|
2019-04-23 10:44:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok((hex_nibble(hex[0])? << 4) + hex_nibble(hex[1])?)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn hexstr_to_u32<T: AsRef<[u8]>>(hex: T) -> Result<u32, Error> {
|
|
|
|
let hex = hex.as_ref();
|
|
|
|
if hex.len() != 8 {
|
2019-04-24 09:49:41 +00:00
|
|
|
bail!("Error while converting hex string to u32: unexpected string length");
|
2019-04-23 10:44:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
let mut bytes: [u8; 4] = unsafe { std::mem::uninitialized() };
|
|
|
|
for i in 0..4 {
|
2019-04-24 09:49:41 +00:00
|
|
|
bytes[i] = (hex_nibble(hex[i * 2])? << 4) + hex_nibble(hex[i * 2 + 1])?;
|
2019-04-23 10:44:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(u32::from_be_bytes(bytes))
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct ProcFsNetIPv6Route {
|
|
|
|
pub dest: Ipv6Addr,
|
|
|
|
pub prefix: u8,
|
|
|
|
pub gateway: Ipv6Addr,
|
|
|
|
pub metric: u32,
|
|
|
|
pub iface: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn read_proc_net_ipv6_route() -> Result<Vec<ProcFsNetIPv6Route>, Error> {
|
|
|
|
let path = "/proc/net/ipv6_route";
|
|
|
|
let file = OpenOptions::new().read(true).open(&path)?;
|
|
|
|
|
|
|
|
let mut result = Vec::new();
|
|
|
|
for line in BufReader::new(&file).lines() {
|
2019-04-24 09:49:41 +00:00
|
|
|
let content = line?;
|
|
|
|
if content.is_empty() { continue; }
|
|
|
|
let mut iter = content.split_whitespace();
|
|
|
|
|
|
|
|
let mut next = || iter.next()
|
|
|
|
.ok_or_else(|| format_err!("Error while parsing '{}'", path));
|
|
|
|
|
|
|
|
let (dest, prefix) = (next()?, next()?);
|
|
|
|
for _ in 0..2 { next()?; }
|
|
|
|
let (nexthop, metric) = (next()?, next()?);
|
|
|
|
for _ in 0..3 { next()?; }
|
|
|
|
let iface = next()?;
|
|
|
|
|
|
|
|
result.push(ProcFsNetIPv6Route {
|
|
|
|
dest: hexstr_to_ipv6addr(dest)?,
|
|
|
|
prefix: hexstr_to_u8(prefix)?,
|
|
|
|
gateway: hexstr_to_ipv6addr(nexthop)?,
|
|
|
|
metric: hexstr_to_u32(metric)?,
|
|
|
|
iface: iface.to_string(),
|
|
|
|
});
|
2019-04-23 10:44:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(result)
|
|
|
|
}
|
2019-04-23 15:04:31 +00:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_read_proc_net_route() {
|
2019-04-24 09:49:41 +00:00
|
|
|
read_proc_net_route().unwrap();
|
2019-04-23 15:04:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_read_proc_net_ipv6_route() {
|
2019-04-24 09:49:41 +00:00
|
|
|
read_proc_net_ipv6_route().unwrap();
|
2019-04-23 15:04:31 +00:00
|
|
|
}
|
|
|
|
}
|