Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CNetworkPosix Class Referenceabstract

#include <NetworkPosix.h>

Inheritance diagram for CNetworkPosix:
CNetworkBase CNetworkFreebsd CNetworkLinux CNetworkMacOS

Public Member Functions

virtual ~CNetworkPosix () override
 
std::vector< CNetworkInterface * > & GetInterfaceList () override
 
CNetworkInterfaceGetFirstConnectedInterface () override
 
int GetSocket ()
 
- Public Member Functions inherited from CNetworkBase
 CNetworkBase ()
 
virtual ~CNetworkBase ()
 
CNetworkServicesGetServices ()
 
virtual bool GetHostName (std::string &hostname)
 
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)
 
virtual bool PingHost (unsigned long host, unsigned int timeout_ms=2000)=0
 
virtual std::vector< std::string > GetNameServers (void)=0
 
void NetworkMessage (EMESSAGE message, int param)
 
bool IsLocalHost (const std::string &hostname)
 
void WaitForNet ()
 

Protected Member Functions

 CNetworkPosix ()
 

Protected Attributes

std::vector< CNetworkInterface * > m_interfaces
 

Additional Inherited Members

- Public Types inherited from CNetworkBase
enum  EMESSAGE { SERVICES_UP , SERVICES_DOWN }
 
- Static Public Member Functions inherited from CNetworkBase
static std::unique_ptr< CNetworkBaseGetNetwork ()
 
static int ParseHex (char *str, unsigned char *addr)
 
static std::string GetIpStr (const sockaddr *sa)
 IPv6/IPv4 compatible conversion of host IP address.
 
static std::string GetMaskByPrefixLength (uint8_t prefixLength)
 convert prefix length of IPv4 address to IP mask representation
 
- Public Attributes inherited from CNetworkBase
std::unique_ptr< CNetworkServicesm_services
 

Constructor & Destructor Documentation

◆ ~CNetworkPosix()

CNetworkPosix::~CNetworkPosix ( )
overridevirtual

◆ CNetworkPosix()

CNetworkPosix::CNetworkPosix ( )
protected

Member Function Documentation

◆ GetFirstConnectedInterface()

CNetworkInterface * CNetworkPosix::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 * > & CNetworkPosix::GetInterfaceList ( void )
overridevirtual

Implements CNetworkBase.

◆ GetSocket()

int CNetworkPosix::GetSocket ( )
inline

Member Data Documentation

◆ m_interfaces

std::vector<CNetworkInterface*> CNetworkPosix::m_interfaces
protected

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