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 EmulatedEthernetInterface internal header */
17 #ifndef IH_SENF_Ext_NetEmu_Ethernet_EmulatedEthernetInterface_
18 #define IH_SENF_Ext_NetEmu_Ethernet_EmulatedEthernetInterface_ 1
21 #include <senf/Ext/NetEmu/Packets.hh>
23 //-/////////////////////////////////////////////////////////////////////////////////////////////////
28 class EmulatedEthernetInterface;
33 /** \brief Internal: Input filter of emulated Ethernet interface */
34 class EmulatedEthernetReceiveFilter
35 : public ppi::module::Module
37 SENF_PPI_MODULE(EmulatedEthernetReceiveFilter);
39 ppi::connector::PassiveInput<EthernetPacketHeader> input;
40 ppi::connector::ActiveOutput<EthernetPacket> output;
42 explicit EmulatedEthernetReceiveFilter(EmulatedEthernetInterface & iface);
46 EmulatedEthernetInterface & iface_;
49 /** \brief Internal: Transmit filter of emulated Ethernet interface */
50 class EmulatedEthernetTransmitFilter
51 : public ppi::module::Module
53 SENF_PPI_MODULE(EmulatedEthernetTransmitFilter);
55 ppi::connector::PassiveInput<EthernetPacket> input;
56 ppi::connector::ActiveOutput<EthernetPacketHeader> output;
58 explicit EmulatedEthernetTransmitFilter(EmulatedEthernetInterface & iface);
63 EmulatedEthernetInterface & iface_;
66 /** \brief Internal: Internal PPI Network of emulated Ethernet interface */
67 struct EmulatedEthernetInterfaceNet
70 EmulatedEthernetReceiveFilter receiveFilter_;
73 EmulatedEthernetTransmitFilter transmitFilter_;
75 //-/////////////////////////////////////////////////////////////////////////////////////////
77 ppi::connector::PassiveInputJack<EthernetPacketHeader> receiveInput;
78 ppi::connector::ActiveOutputJack<EthernetPacket> receiveOutput;
80 ppi::connector::PassiveInputJack<EthernetPacket> transmitInput;
81 ppi::connector::ActiveOutputJack<EthernetPacketHeader> transmitOutput;
83 EmulatedEthernetInterfaceNet();
85 EmulatedEthernetInterface & self();
86 EmulatedEthernetInterface const & self() const;
92 //-/////////////////////////////////////////////////////////////////////////////////////////////////
100 // c-file-style: "senf"
101 // indent-tabs-mode: nil
102 // ispell-local-dictionary: "american"
103 // compile-command: "scons -u test"