mn_network_device.hpp
Go to the documentation of this file.
1 
20 #ifndef __MINILIB_DEV_NETWORK_DEVICE_H__
21 #define __MINILIB_DEV_NETWORK_DEVICE_H__
22 
23 #include "../mn_config.hpp"
24 
25 #include "../net/mn_basic_ip4_address.hpp"
26 #include "mn_basic_device.hpp"
27 
28 namespace mn {
29  namespace device {
31  public:
33 
35  : basic_network_device("dev") { }
36 
37  basic_network_device(char prefix[8])
38  : basic_device(prefix) { }
39 
44  virtual int set_ipinfo(const ip4_adress_t& local_ip, const ip4_adress_t& gateway,
45  const ip4_adress_t& subnet) = 0;
46 
51  virtual int get_ipinfo(ip4_adress_t& local_ip, ip4_adress_t& gateway,
52  ip4_adress_t& subnet) = 0;
53 
58  virtual const char* get_mac() = 0;
59  };
60  }
61 }
62 
63 
64 
65 #endif // __MINILIB_DEV_NETWORK_DEVICE_H__
Definition: mn_basic_device.hpp:27
Definition: mn_network_device.hpp:30
basic_network_device()
Definition: mn_network_device.hpp:34
virtual const char * get_mac()=0
Get the MAC of the WiFi AP device as string.
virtual int get_ipinfo(ip4_adress_t &local_ip, ip4_adress_t &gateway, ip4_adress_t &subnet)=0
Get IPv4 infos, local ip, gateway and subnet.
basic_network_device(char prefix[8])
Definition: mn_network_device.hpp:37
virtual int set_ipinfo(const ip4_adress_t &local_ip, const ip4_adress_t &gateway, const ip4_adress_t &subnet)=0
Set IPv4 infos, local ip, gateway and subnet.
This class represents an internet (IP) version 6 host address.
Definition: mn_basic_ip4_address.hpp:38
This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniThread ).
Definition: mn_allocator_typetraits.hpp:25