17 #ifndef HH_SENF_Ext_NetEmu_EmulatedInterface_ 18 #define HH_SENF_Ext_NetEmu_EmulatedInterface_ 1 77 :
public detail::InterfaceAccess<Interface>,
78 public detail::CommfaceAccess<EmulatedReceiver, EmulatedTransmitter>
81 using detail::CommfaceAccess<EmulatedReceiver, EmulatedTransmitter>::receiver;
82 using detail::CommfaceAccess<EmulatedReceiver, EmulatedTransmitter>::transmitter;
90 UDPClientHandle::Address emulationAddress()
const;
93 void emulationInterface(std::string
const & interface);
95 std::string
const & emulationInterface()
const;
98 std::uint32_t
const & interfaceIndex()
const;
104 void emulationAddress(UDPClientHandle::Address
const & address);
111 void enableEmulatedInterface();
114 void disableEmulatedInterface();
117 bool emulatedInterfaceEnabled()
const;
126 virtual void v_initEmulationInterface() = 0;
127 virtual void v_deinitEmulationInterface() = 0;
133 UDPClientHandle::Address address_;
136 std::string interface_;
137 std::uint32_t interfaceIndex_;
140 static std::uint32_t emuInterfaceIndex;
148 :
public detail::InterfaceAccess<EmulatedInterface>,
149 public detail::InterfaceAccess<Interface>
152 detail::EmulatedInterfaceReceiveFilter filter_;
153 detail::DroppedPacketChecker dropChecker_;
154 detail::DelayTimeChecker delayChecker_;
156 detail::AdvancePacket advance_;
167 unsigned delayedPackets()
const;
170 unsigned droppedPackets()
const;
172 double lossRate()
const;
173 void lossRate(
double lossRate);
181 void initEmulatedReceiver();
184 void deinitEmulatedReceiver();
187 bool promiscEmulatedReceiver()
const;
190 void promiscEmulatedReceiver(
bool v);
193 void annotationModeEmulatedReceiver(
bool a);
196 bool annotationModeEmulatedReceiver()
const;
199 void mcAddEmulatedReceiver(
MACAddress const & address);
202 void mcDropEmulatedReceiver(
MACAddress const & address);
207 typedef detail::InterfaceAccess<EmulatedInterface> emui;
208 typedef detail::InterfaceAccess<Interface> basei;
211 bool annotationMode_;
212 std::set<MACAddress> mcSet_;
214 friend class detail::EmulatedInterfaceReceiveFilter;
222 :
public detail::InterfaceAccess<EmulatedInterface>,
223 public detail::InterfaceAccess<Interface>
235 void initEmulatedTransmitter();
238 void deinitEmulatedTransmitter();
242 unsigned mtuEmulatedTransmitter()
const;
245 void mtuEmulatedTransmitter(
unsigned v);
257 typedef detail::InterfaceAccess<EmulatedInterface> emui;
258 typedef detail::InterfaceAccess<Interface> basei;
260 detail::EmulatedInterfaceTransmitFilter filter_;
264 friend class detail::EmulatedInterfaceTransmitFilter;
276 public detail::InterfaceAccess<WiredInterface>,
277 public detail::CommfaceAccess<EmulatedWiredReceiver, EmulatedWiredTransmitter>
280 using detail::InterfaceAccess<WiredInterface>::interface;
281 using detail::CommfaceAccess<EmulatedWiredReceiver, EmulatedWiredTransmitter>::receiver;
282 using detail::CommfaceAccess<EmulatedWiredReceiver, EmulatedWiredTransmitter>::transmitter;
296 public detail::InterfaceAccess<WiredInterface>
302 using detail::InterfaceAccess<EmulatedInterface>::interface;
310 public detail::InterfaceAccess<WiredInterface>
316 using detail::InterfaceAccess<EmulatedInterface>::interface;
config::time_type clock_type
Emulated interface base-class for transmit capable interfaces.
Emulated interface base-class for receive capable wired interfaces.
PacketDropper public header.
PacketDelayer public header.
ppi::connector::ActiveOutputJack receiverJack
Emulated interface base-class.
senf::detail::packet::size_type size_type
Emulated interface base-class for receive capable interfaces.
InterfaceAPI public header.
senf::UDPv4ClientSocketHandle UDPClientHandle
Emulated interface base-class for wired interfaces.
UDPClientHandle::Address emulationAddress() const
Get current emulated traffic multicast address.
ProtocolClientSocketHandle< UDPv4SocketProtocol > UDPv4ClientSocketHandle
ppi::connector::PassiveInputJack transmitterJack
Emulated interface base-class for transmit capable wired interfaces.