kodi
NetworkLinux.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "platform/posix/network/NetworkPosix.h"
12 
13 #include <string>
14 #include <vector>
15 
17 {
18 public:
20  std::string interfaceName,
21  char interfaceMacAddrRaw[6]);
22  ~CNetworkInterfaceLinux() override = default;
23 
24  std::string GetCurrentDefaultGateway() const override;
25  bool GetHostMacAddress(unsigned long host, std::string& mac) const override;
26 };
27 
29 {
30 public:
31  CNetworkLinux();
32  ~CNetworkLinux() override = default;
33 
34  bool PingHost(unsigned long host, unsigned int timeout_ms = 2000) override;
35  std::vector<std::string> GetNameServers(void) override;
36 
37 private:
38  void GetMacAddress(const std::string& interfaceName, char macAddrRaw[6]) override;
39  void queryInterfaceList() override;
40 };
Definition: NetworkLinux.h:16
Definition: NetworkLinux.h:28
Definition: NetworkPosix.h:18
Definition: NetworkPosix.h:43