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 EmulatedWLANInterface internal header */
17 #ifndef IH_SENF_Ext_NetEmu_WLAN_EmulatedWLANInterface_
18 #define IH_SENF_Ext_NetEmu_WLAN_EmulatedWLANInterface_ 1
21 #include <senf/Packets/80211Bundle/RadiotapPacket.hh>
22 #include <senf/Packets/80211Bundle/WLANPacket.hh>
23 #include <senf/Ext/NetEmu/Packets.hh>
25 //-/////////////////////////////////////////////////////////////////////////////////////////////////
30 class EmulatedWLANInterface;
34 /** \brief Internal: Beacon generator for emulated WLAN interface*/
35 class EmulatedWLANBeaconGenerator
36 : public ppi::module::Module
38 SENF_PPI_MODULE(EmulatedWLANBeaconGenerator);
40 ppi::connector::ActiveOutput<> output;
42 explicit EmulatedWLANBeaconGenerator(EmulatedWLANInterface & iface);
44 void beaconInterval(ClockService::clock_type interval);
45 ClockService::clock_type beaconInterval();
51 ppi::IntervalTimer timer_;
52 EmulatedWLANInterface & iface_;
53 WLANPacket_MgtFrame beacon_;
56 /** \brief Internal: Input filter of emulated WLAN interface */
57 class EmulatedWLANReceiveFilter
58 : public ppi::module::Module
60 SENF_PPI_MODULE(EmulatedWLANReceiveFilter);
62 ppi::connector::PassiveInput<WLANPacketHeader> input;
63 ppi::connector::ActiveOutput<EthernetPacket> output;
65 explicit EmulatedWLANReceiveFilter(EmulatedWLANInterface & iface);
70 EmulatedWLANInterface & iface_;
73 /** \brief Internal: Transmit filter of emulated WLAN interface */
74 class EmulatedWLANTransmitFilter
75 : public ppi::module::Module
77 SENF_PPI_MODULE(EmulatedWLANTransmitFilter);
79 ppi::connector::PassiveInput<EthernetPacket> input;
80 ppi::connector::ActiveOutput<WLANPacketHeader> output;
81 ppi::connector::PassiveInput<WLANPacket_MgtFrame> beaconInput;
83 explicit EmulatedWLANTransmitFilter(EmulatedWLANInterface & iface);
89 EmulatedWLANInterface & iface_;
92 /** \brief Internal: Internal PPI Network of emulated WLAN interface */
93 struct EmulatedWLANInterfaceNet
96 EmulatedWLANReceiveFilter receiveFilter_;
99 EmulatedWLANTransmitFilter transmitFilter_;
100 EmulatedWLANBeaconGenerator beaconGenerator_;
102 //-/////////////////////////////////////////////////////////////////////////////////////////
104 ppi::connector::PassiveInputJack<WLANPacketHeader> receiveInput;
105 ppi::connector::ActiveOutputJack<EthernetPacket> receiveOutput;
107 ppi::connector::PassiveInputJack<EthernetPacket> transmitInput;
108 ppi::connector::ActiveOutputJack<WLANPacketHeader> transmitOutput;
110 EmulatedWLANInterfaceNet();
112 EmulatedWLANInterface & self();
113 EmulatedWLANInterface const & self() const;
115 void beaconInterval(ClockService::clock_type interval);
116 ClockService::clock_type beaconInterval();
121 //-/////////////////////////////////////////////////////////////////////////////////////////////////
128 // comment-column: 40
129 // c-file-style: "senf"
130 // indent-tabs-mode: nil
131 // ispell-local-dictionary: "american"
132 // compile-command: "scons -u test"