Function mprober_lib::hostname::get_hostname[][src]

pub fn get_hostname() -> Result<String, ScannerError>

Get the hostname using the gethostname function in libc.

extern crate mprober_lib;

use mprober_lib::hostname;

let hostname = hostname::get_hostname().unwrap();

println!("{}", hostname);