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
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
15 \brief HardwareWLANInterface internal header */
17 #ifndef IH_SENF_Ext_NetEmu_WLAN_HardwareWLANInterface_
18 #define IH_SENF_Ext_NetEmu_WLAN_HardwareWLANInterface_ 1
21 #include <senf/Socket/Protocols/Raw/MMapPacketSocketHandle.hh>
22 #include <senf/Packets/DefaultBundle/EthernetPacket.hh>
23 #include <senf/Packets/80211Bundle/RadiotapPacket.hh>
24 #include <senf/PPI/QueueSocketSourceSink.hh>
25 #include "../Ethernet/EthernetAnnotator.hh"
26 #include "MonitorDataFilter.hh"
27 #include "TSFTHistogram.hh"
29 //-/////////////////////////////////////////////////////////////////////////////////////////////////
34 class HardwareWLANInterface;
38 /** \brief Internal: Hardware WLAN interface PPI network */
39 struct HardwareWLANInterfaceNet
41 ConnectedMMapPacketSocketHandle socket;
42 ppi::module::ActiveQueueSocketSource<EthernetPacket> source;
43 ppi::module::PassiveQueueSocketSink<> sink;
44 EthernetAnnotator annotatorRx_;
45 EthernetAnnotator annotatorTx_;
47 ConnectedMMapReadPacketSocketHandle monSocket;
48 ppi::module::ActiveQueueSocketSource<RadiotapPacket> monSource;
49 MonitorDataFilter monitorDataFilter;
51 ppi::connector::ActiveOutputJack<EthernetPacket> netOutput;
52 ppi::connector::PassiveInputJack<EthernetPacket> netInput;
54 HardwareWLANInterfaceNet();
56 HardwareWLANInterface & self();
57 HardwareWLANInterface const & self() const;
59 void assignDataSocket(ConnectedMMapPacketSocketHandle & socket);
60 void assignMonitorSocket(ConnectedMMapReadPacketSocketHandle & monSocket);
63 void rcvBuf(unsigned);
65 void sndBuf(unsigned);
68 void dataSource(bool on);
70 TSFTHistogram & tsftHistogram();
75 //-/////////////////////////////////////////////////////////////////////////////////////////////////
83 // c-file-style: "senf"
84 // indent-tabs-mode: nil
85 // ispell-local-dictionary: "american"
86 // compile-command: "scons -u test"