EthernetController.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_Ext_NetEmu_Ethernet_EthernetController_
18 #define HH_SENF_Ext_NetEmu_Ethernet_EthernetController_ 1
19 
20 // Custom includes
22 
23 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 
25 namespace senf {
26 namespace emu {
27 
32  : public NetdeviceController
33  {
34  public:
36 
37  explicit EthernetController(std::string const & interface_name);
38  explicit EthernetController(int interface_index);
39 
40  unsigned speed() const;
41  Duplex_mode duplex() const;
42  std::string duplexAsString() const;
43  static std::string duplexAsString(Duplex_mode mode);
44  bool hasLink() const;
45  bool nWayReset();
46  bool ringSize(std::uint32_t rx, std::uint32_t tx);
47  std::pair<std::uint32_t,std::uint32_t> ringSize();
48  bool setEEE(bool on);
49  bool getEEE();
50  };
51 
52 }}
53 
54 //-/////////////////////////////////////////////////////////////////////////////////////////////////
55 //#include "EthernetController.cci"
56 //#include "EthernetController.ct"
57 //#include "EthernetController.cti"
58 #endif
59 
60 
61 // Local Variables:
62 // mode: c++
63 // fill-column: 100
64 // comment-column: 40
65 // c-file-style: "senf"
66 // indent-tabs-mode: nil
67 // ispell-local-dictionary: "american"
68 // compile-command: "scons -u test"
69 // End:
std::string duplexAsString() const
EthernetController(std::string const &interface_name)
std::pair< std::uint32_t, std::uint32_t > ringSize()
Control ethernet interfaces.