E2SAR 0.2.0
All Data Structures Namespaces Functions Typedefs Enumerations
e2sar::NetUtil Class Reference

Static Public Member Functions

static size_t getMTU (const std::string &interfaceName) noexcept
 
static result< std::string > getHostName () noexcept
 
static result< std::vector< ip::address > > getInterfaceIPs (const std::string &interfaceName, bool v6=false) noexcept
 

Member Function Documentation

◆ getHostName()

result< std::string > e2sar::NetUtil::getHostName ( )
staticnoexcept

Get the hostname of the host

◆ getInterfaceIPs()

result< std::vector< ip::address > > e2sar::NetUtil::getInterfaceIPs ( const std::string & interfaceName,
bool v6 = false )
staticnoexcept

get IPs of an interface (by name), either IPv4 or IPv6

◆ getMTU()

size_t e2sar::NetUtil::getMTU ( const std::string & interfaceName)
staticnoexcept

Get MTU of a given interface

Parameters
interfaceName- name of the interface
Returns
MTU or 1500 as the best guess

Get MTU of a given interface. Used in constructors, so doesn't return error.


The documentation for this class was generated from the following files: