#include <Network.h>
|
static int | ParseHex (char *str, unsigned char *addr) |
|
static std::string | GetIpStr (const sockaddr *sa) |
| IPv6/IPv4 compatible conversion of host IP address. More...
|
|
static std::string | GetMaskByPrefixLength (uint8_t prefixLength) |
| convert prefix length of IPv4 address to IP mask representation More...
|
|
◆ EMESSAGE
Enumerator |
---|
SERVICES_UP | |
SERVICES_DOWN | |
◆ CNetworkBase()
CNetworkBase::CNetworkBase |
( |
| ) |
|
◆ ~CNetworkBase()
CNetworkBase::~CNetworkBase |
( |
| ) |
|
|
virtual |
◆ GetFirstConnectedInterface()
◆ GetHostName()
bool CNetworkBase::GetHostName |
( |
std::string & |
hostname | ) |
|
|
virtual |
◆ GetInterfaceByName()
◆ GetInterfaceList()
◆ GetIpStr()
std::string CNetworkBase::GetIpStr |
( |
const sockaddr * |
sa | ) |
|
|
static |
IPv6/IPv4 compatible conversion of host IP address.
- Parameters
-
- Returns
- Function converts binary structure sockaddr to std::string. It can read sockaddr_in and sockaddr_in6, cast as (sockaddr*). IPv4 address is returned in the format x.x.x.x (where x is 0-255), IPv6 address is returned in it's canonised form. On error (or no IPv6/v4 valid input) empty string is returned.
◆ GetMaskByPrefixLength()
std::string CNetworkBase::GetMaskByPrefixLength |
( |
uint8_t |
prefixLength | ) |
|
|
static |
convert prefix length of IPv4 address to IP mask representation
- Parameters
-
- Returns
◆ GetNameServers()
virtual std::vector< std::string > CNetworkBase::GetNameServers |
( |
void |
| ) |
|
|
pure virtual |
◆ GetServices()
◆ HasInterfaceForIP()
bool CNetworkBase::HasInterfaceForIP |
( |
unsigned long |
address | ) |
|
◆ IsAvailable()
bool CNetworkBase::IsAvailable |
( |
void |
| ) |
|
◆ IsConnected()
bool CNetworkBase::IsConnected |
( |
void |
| ) |
|
◆ IsLocalHost()
bool CNetworkBase::IsLocalHost |
( |
const std::string & |
hostname | ) |
|
◆ NetworkMessage()
void CNetworkBase::NetworkMessage |
( |
EMESSAGE |
message, |
|
|
int |
param |
|
) |
| |
◆ ParseHex()
int CNetworkBase::ParseHex |
( |
char * |
str, |
|
|
unsigned char * |
addr |
|
) |
| |
|
static |
◆ PingHost() [1/2]
virtual bool CNetworkBase::PingHost |
( |
unsigned long |
host, |
|
|
unsigned int |
timeout_ms = 2000 |
|
) |
| |
|
pure virtual |
◆ PingHost() [2/2]
bool CNetworkBase::PingHost |
( |
unsigned long |
host, |
|
|
unsigned short |
port, |
|
|
unsigned int |
timeout_ms = 2000 , |
|
|
bool |
readability_check = false |
|
) |
| |
◆ SetNameServers()
virtual void CNetworkBase::SetNameServers |
( |
const std::vector< std::string > & |
nameServers | ) |
|
|
pure virtual |
◆ StartServices()
void CNetworkBase::StartServices |
( |
| ) |
|
◆ StopServices()
void CNetworkBase::StopServices |
( |
bool |
bWait | ) |
|
◆ WaitForNet()
void CNetworkBase::WaitForNet |
( |
| ) |
|
◆ WakeOnLan()
bool CNetworkBase::WakeOnLan |
( |
const char * |
mac | ) |
|
◆ m_services
The documentation for this class was generated from the following files: