Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CNetworkLinux Class Reference

#include <NetworkLinux.h>

Inheritance diagram for CNetworkLinux:
CNetworkBase

Public Member Functions

 CNetworkLinux ()
 
 ~CNetworkLinux (void) override
 
std::vector< CNetworkInterface * > & GetInterfaceList (void) override
 
CNetworkInterfaceGetFirstConnectedInterface (void) override
 
bool PingHost (unsigned long host, unsigned int timeout_ms=2000) override
 
std::vector< std::string > GetNameServers (void) override
 
void SetNameServers (const std::vector< std::string > &nameServers) override
 
- Public Member Functions inherited from CNetworkBase
 CNetworkBase ()
 
virtual ~CNetworkBase ()
 
CNetworkServicesGetServices ()
 
virtual bool GetHostName (std::string &hostname)
 
CNetworkInterfaceGetInterfaceByName (const std::string &name)
 
bool HasInterfaceForIP (unsigned long address)
 
bool IsAvailable (void)
 
bool IsConnected (void)
 
bool WakeOnLan (const char *mac)
 
bool PingHost (unsigned long host, unsigned short port, unsigned int timeout_ms=2000, bool readability_check=false)
 
void NetworkMessage (EMESSAGE message, int param)
 
void StartServices ()
 
void StopServices (bool bWait)
 
bool IsLocalHost (const std::string &hostname)
 
void WaitForNet ()
 

Friends

class CNetworkInterfaceLinux
 

Additional Inherited Members

- Public Types inherited from CNetworkBase
enum  EMESSAGE { SERVICES_UP , SERVICES_DOWN }
 
- Static Public Member Functions inherited from CNetworkBase
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...
 
- Public Attributes inherited from CNetworkBase
std::unique_ptr< CNetworkServicesm_services
 

Constructor & Destructor Documentation

◆ CNetworkLinux()

CNetworkLinux::CNetworkLinux ( )

◆ ~CNetworkLinux()

CNetworkLinux::~CNetworkLinux ( void  )
override

Member Function Documentation

◆ GetFirstConnectedInterface()

CNetworkInterface * CNetworkLinux::GetFirstConnectedInterface ( void  )
overridevirtual
Bug:
Overwrite the GetFirstConnectedInterface and requery the interface list if no connected device is found this fixes a bug when no network is available after first start of xbmc and the interface comes up during runtime

Reimplemented from CNetworkBase.

◆ GetInterfaceList()

std::vector< CNetworkInterface * > & CNetworkLinux::GetInterfaceList ( void  )
overridevirtual

Implements CNetworkBase.

◆ GetNameServers()

std::vector< std::string > CNetworkLinux::GetNameServers ( void  )
overridevirtual

Implements CNetworkBase.

◆ PingHost()

bool CNetworkLinux::PingHost ( unsigned long  host,
unsigned int  timeout_ms = 2000 
)
overridevirtual

Implements CNetworkBase.

◆ SetNameServers()

void CNetworkLinux::SetNameServers ( const std::vector< std::string > &  nameServers)
overridevirtual
Todo:
implement

Implements CNetworkBase.

Friends And Related Function Documentation

◆ CNetworkInterfaceLinux

friend class CNetworkInterfaceLinux
friend

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