Emulated interface base-class. More...

#include <senf/Ext/NetEmu/EmulatedInterface.hh>

Inheritance diagram for senf::emu::EmulatedInterface:

Public Member Functions

virtual ~EmulatedInterface ()
 
UDPClientHandle emulationSocket () const
 Get the emulation socket handle. More...
 
UDPClientHandle::Address emulationAddress () const
 Get current emulated traffic multicast address. More...
 
void emulationInterface (std::string const &interface)
 Set interface on which to send/receive emulated traffic. More...
 
std::string const & emulationInterface () const
 Get interface on which emulated traffic is sent/received. More...
 
std::uint32_t const & interfaceIndex () const
 

Protected Member Functions

 EmulatedInterface ()
 
void init ()
 
void emulationAddress (UDPClientHandle::Address const &address)
 Change the emulated traffic multicast address. More...
 
void enableEmulatedInterface ()
 Enable the interface. More...
 
void disableEmulatedInterface ()
 Disable the interface. More...
 
bool emulatedInterfaceEnabled () const
 Get current interface state. More...
 
virtual void v_initEmulationInterface ()=0
 Called to initialize the emulated interface. More...
 
virtual void v_deinitEmulationInterface ()=0
 Called to shut down the emulated interface. More...
 

Detailed Description

Emulated interface base-class.

This is the base-class of all emulated interfaces. Don't derive directly from this class, derive from EmulatedWirelessInterface or EmulatedWiredInterface.

Definition at line 76 of file EmulatedInterface.hh.

Constructor & Destructor Documentation

◆ ~EmulatedInterface()

virtual senf::emu::EmulatedInterface::~EmulatedInterface ( )
virtual

◆ EmulatedInterface()

senf::emu::EmulatedInterface::EmulatedInterface ( )
protected

Member Function Documentation

◆ disableEmulatedInterface()

void senf::emu::EmulatedInterface::disableEmulatedInterface ( )
protected

Disable the interface.

Must be called by the interface implementations v_disable() implementation.

Definition at line 253 of file EmulatedInterface.cc.

◆ emulatedInterfaceEnabled()

bool senf::emu::EmulatedInterface::emulatedInterfaceEnabled ( ) const
protected

Get current interface state.

This should be used to implement the interface implementations v_enabled() member.

◆ emulationAddress() [1/2]

UDPClientHandle::Address senf::emu::EmulatedInterface::emulationAddress ( ) const

Get current emulated traffic multicast address.

◆ emulationAddress() [2/2]

void senf::emu::EmulatedInterface::emulationAddress ( UDPClientHandle::Address const &  address)
protected

Change the emulated traffic multicast address.

This member allows to change the multicast address on which emulated network traffic is sent. Depending on the type of emulated interface, it should not be called directly but may be controlled by the interface implementation.

Definition at line 261 of file EmulatedInterface.cc.

◆ emulationInterface() [1/2]

void senf::emu::EmulatedInterface::emulationInterface ( std::string const &  interface)

Set interface on which to send/receive emulated traffic.

◆ emulationInterface() [2/2]

std::string const& senf::emu::EmulatedInterface::emulationInterface ( ) const

Get interface on which emulated traffic is sent/received.

◆ emulationSocket()

UDPClientHandle senf::emu::EmulatedInterface::emulationSocket ( ) const

Get the emulation socket handle.

This is the socket on which all emulated traffic is sent or received.

◆ enableEmulatedInterface()

void senf::emu::EmulatedInterface::enableEmulatedInterface ( )
protected

Enable the interface.

Must be called be the interface implementations v_enable() implementation.

Definition at line 246 of file EmulatedInterface.cc.

◆ init()

void senf::emu::EmulatedInterface::init ( )
protected

Definition at line 220 of file EmulatedInterface.cc.

◆ interfaceIndex()

std::uint32_t const& senf::emu::EmulatedInterface::interfaceIndex ( ) const

◆ v_deinitEmulationInterface()

virtual void senf::emu::EmulatedInterface::v_deinitEmulationInterface ( )
protectedpure virtual

Called to shut down the emulated interface.

◆ v_initEmulationInterface()

virtual void senf::emu::EmulatedInterface::v_initEmulationInterface ( )
protectedpure virtual

Called to initialize the emulated interface.


The documentation for this class was generated from the following files: