Hardware WLAN Interface. More...

#include <senf/Ext/NetEmu/WLAN/HardwareWLANInterface.hh>

Inheritance diagram for senf::emu::HardwareWLANInterface:

Classes

struct  HTMode
 

Public Types

typedef TypedInterfaceDecorator< HardwareWLANInterface, WirelessInterface::DecoratorDecorator
 
- Public Types inherited from senf::emu::WirelessInterface
typedef TypedInterfaceDecorator< WirelessInterface, Interface::DecoratorDecorator
 WirelessInterface base class specific decorator type. More...
 
typedef boost::filter_iterator< frequency_is_whitelisted, Frequencies::const_iteratorFrequencyIterator
 
typedef boost::iterator_range< FrequencyIteratorFrequenciesRange
 Range of frequency entries. More...
 
- Public Types inherited from senf::emu::Interface
typedef InterfaceDecorator Decorator
 Interface base class specific decorator type More...
 
- Public Types inherited from senf::emu::WirelessTransmitter
typedef boost::iterator_range< TxPowers::const_iteratorTxPowersRange
 

Public Member Functions

 HardwareWLANInterface (std::pair< std::string, std::string > interfaces)
 
virtual ~HardwareWLANInterface ()
 
std::string const & v_device () const override
 Get name of physical device. More...
 
std::string const & monitorDevice () const
 Get current monitor interface. More...
 
void setREDFilterCallbackRx (senf::ppi::REDFilterCallback const &cb)
 
void setREDFilterCallbackTx (senf::ppi::REDFilterCallback const &cb)
 
void setREDFilterCallbackRxMonitor (senf::ppi::REDFilterCallback const &cb)
 
MonitorDataFilterStatistics filterStats ()
 
void monitorDropUnknownMCS (bool q)
 
WirelessNLController::IbssJoinParameters::ptrI joinAdhoc (std::string const &ssid, unsigned int freq, unsigned int bandwidth, bool &success)
 
WirelessNLController::MeshJoinParameters::ptrM joinMesh (std::string const &meshId, unsigned int freq, unsigned int bandwidth, bool &success)
 
void leaveCell ()
 
bool cellJoined () const
 
void setCellJoined (unsigned bandwidth)
 
int frequencyOffset () const
 
void frequencyOffset (int offset)
 
void restrictBand (WirelessNLController::Band_t band)
 
void restrictBand ()
 
void refreshProperties ()
 
void htMode (HTMode::Enum mode)
 
HTMode::Enum htMode () const
 
unsigned sndBuf ()
 
void sndBuf (unsigned sndbuf)
 
unsigned rcvBuf ()
 
void rcvBuf (unsigned rcvbuf)
 
unsigned qlen () const
 
void qlen (unsigned qlen)
 
std::pair< unsigned, unsigned > rxDropped ()
 
std::tuple< unsigned, unsigned, unsigned > txDropped ()
 
unsigned maxBurst () const
 
void maxBurst (unsigned maxBurst)
 
VLanId const & pvid () const
 
bool pvid (VLanId const &p, bool accessMode)
 
std::uint32_t vlanMismatchRx ()
 
std::uint32_t vlanMismatchTx ()
 
std::pair< senf::emu::WirelessNLController::DFSState::Enum, std::uint32_t > dfsState (unsigned freq, unsigned bw)
 
void startCAC (unsigned int freq, unsigned int bandwidth)
 
void cacAborted ()
 
void dumpMmapStats (std::ostream &os)
 
void dumpFilterStats (std::ostream &os)
 
bool isDead () const
 
void airTime (bool a)
 
WifiStatisticsMap const & statisticsMap (std::uint32_t tag, senf::ClockService::clock_type const &maxAge)
 
void dumpWifiStatistics (std::ostream &os)
 
void frequencyHint (unsigned bandwidth)
 
void spectralScanCallback (AthSpectralScan::AthSpectralScanCallback const &cb)
 
void spectralScanCallback ()
 
void spectralScanStats (std::ostream &os)
 
senf::emu::WirelessNLController::NetlinkEvent< RadarEvent > & radarEvent ()
 
senf::emu::WirelessNLController::NetlinkEvent< ScanEvent > & scanEvent ()
 
void triggerScan (std::ostream &os, std::set< WirelessNLController::frequency_type > const &frequencies)
 
void getScan (std::ostream &os)
 
void dumpSurvey (std::ostream &os)
 
WirelessNLControllerwirelessNLController ()
 
void modulationSet (std::set< ModulationParameter::id_t > const &ids={})
 
- Public Member Functions inherited from senf::emu::WLANInterface
template<class Output , class Input >
 WLANInterface (Output &output, Input &input)
 
void modulation (WLANModulationParameter::Type type, unsigned index, unsigned streams)
 
void modulation (WLANModulationParameter::Type type, unsigned value)
 
void modulation (WLANModulationParameter::Type type)
 
unsigned maxNSS () const
 
- Public Member Functions inherited from senf::emu::WirelessInterface
ModulationParameterIds const & modulationParameterIds () const
 Get list of valid parameters. More...
 
unsigned maxNSS () const
 Get max numer of spatial stream;. More...
 
unsigned frequency () const
 Get current channel frequency. More...
 
unsigned bandwidth () const
 Get current bandwidth. More...
 
void frequency (unsigned freq)
 Set channel frequency. More...
 
void frequency (unsigned freq, unsigned bw)
 Set channel frequency and bandwidth. More...
 
FrequenciesRange frequencies () const
 Get valid frequency intervals. More...
 
void whitelistedFrequencyRange (unsigned frequencyLower, unsigned frequencyUpper)
 
void whitelistedChannel (unsigned frequency, unsigned bandwidth)
 
void clearWhitelistedFrequencies ()
 
void coverageRange (unsigned distance)
 set the coverage range of the interface in meters More...
 
- Public Member Functions inherited from senf::emu::Interface
virtual ~Interface ()
 
bool canTransmit () const
 true, if interface is transmit capable More...
 
bool canReceive () const
 true, if interface is receive capable More...
 
void enable ()
 Enable interface (aka ifconfig up) More...
 
void disable ()
 Disable interface (aka ifconfig down) More...
 
bool enabled () const
 true, if interface enabled More...
 
unsigned index () const
 Get interface index. More...
 
void id (MACAddress const &eui)
 Change interface MAC. More...
 
MACAddress const & id () const
 Get interface MAC Address. More...
 
void deviceId (InterfaceDeviceId id)
 
InterfaceDeviceId deviceId () const
 
std::string const & device () const
 
boost::uint8_t linkTypeId () const
 
std::string interfaceTypeName () const
 
console::DirectoryNodeconsoleDir () const
 Access interface console directory. More...
 
console::DirectoryNodestatisticsDir () const
 Access the interface statistics directory. More...
 
template<class Stat >
senf::StatisticsregisterStatistics (std::string name, Stat &stat)
 Register statistics source. More...
 
boost::optional< senf::Statistics & > statistic (std::string const &name)
 Get registered statistic. More...
 
void startStatistics (ClockService::clock_type inverval)
 Start statistics generation. More...
 
- Public Member Functions inherited from senf::emu::Receiver
virtual ~Receiver ()
 
bool annotationMode () const
 Get interface annotationMode status. More...
 
void annotationMode (bool a)
 Enable/Disable AnnotationPackets for each frame. More...
 
bool promisc () const
 Get interface promiscuous status. More...
 
void promisc (bool v)
 Change interface promiscuous status. More...
 
void mcAdd (senf::MACAddress const &address)
 
void mcDrop (senf::MACAddress const &address)
 
void flushRxQueues ()
 Flush Rx Queues. More...
 
- Public Member Functions inherited from senf::emu::WirelessTransmitter
ModulationParameter::id_t modulation () const
 Get current modulation parameter configuration id. More...
 
void modulation (ModulationParameter::id_t id)
 Set modulation parameter configuration by id. More...
 
int txPower () const
 Get current transmit power. More...
 
void txPower (int power)
 Set transmit power. More...
 
TxPowersRange txPowers () const
 Get valid transmit power ranges. More...
 
- Public Member Functions inherited from senf::emu::Transmitter
virtual ~Transmitter ()
 
unsigned mtu () const
 Get interface MTU. More...
 
void mtu (unsigned v)
 Set interface MTU. More...
 
void flushTxQueues ()
 Flush Tx Queues. More...
 

Protected Attributes

NetdeviceController netctl_
 
WirelessNLController wnlc_
 

Additional Inherited Members

- Static Public Member Functions inherited from senf::emu::Interface
static unsigned nodeId ()
 Get unique node id. More...
 
static void nodeId (unsigned id)
 Set unique node id. More...
 
- Public Attributes inherited from senf::emu::Interface
boost::signals2::signal< void(Interface &, MACAddress)> idChangedSignal
 
- Public Attributes inherited from senf::emu::Receiver
ppi::connector::ActiveOutputJack< EthernetPacketoutput
 
- Public Attributes inherited from senf::emu::Transmitter
ppi::connector::PassiveInputJack< EthernetPacketinput
 
- Static Public Attributes inherited from senf::emu::WLANInterface
static const boost::uint8_t linkTypeId = 19
 
- Protected Member Functions inherited from senf::emu::WLANInterface
void init ()
 
- Protected Member Functions inherited from senf::emu::WirelessInterface
 WirelessInterface ()
 
void init ()
 
void clearRegisteredFrequencies ()
 remove all registered frequencies More...
 
void clearRegisteredModulations ()
 remove all registered modulations More...
 
void registerFrequency (unsigned frequency, unsigned bandwidth)
 register single frequency/bandwidth combination More...
 
void registerFrequency (unsigned frequencyLower, unsigned frequencyUpper, unsigned bandwidthLower, unsigned bandwidthUpper)
 register frequency/bandwidth range More...
 
void registerModulation (ModulationParameter::id_t id)
 register modulation configuration More...
 
- Protected Member Functions inherited from senf::emu::Interface
 Interface ()
 
void init ()
 Initialize interface. More...
 
- Protected Member Functions inherited from senf::emu::WirelessReceiver
 WirelessReceiver (ppi::connector::ActiveOutput<> &output)
 
 WirelessReceiver (ppi::connector::ActiveOutput< EthernetPacket > &output)
 
 WirelessReceiver (ppi::connector::ActiveOutputJack<> &output)
 
 WirelessReceiver (ppi::connector::ActiveOutputJack< EthernetPacket > &output)
 
void init ()
 
- Protected Member Functions inherited from senf::emu::WirelessTransmitter
 WirelessTransmitter (ppi::connector::PassiveInput<> &input)
 
 WirelessTransmitter (ppi::connector::PassiveInput< EthernetPacket > &input)
 
 WirelessTransmitter (ppi::connector::PassiveInputJack<> &input)
 
 WirelessTransmitter (ppi::connector::PassiveInputJack< EthernetPacket > &input)
 
void init ()
 
void registerTxPower (int power)
 
void registerTxPower (int powerLower, int powerUpper)
 
- Protected Member Functions inherited from senf::emu::HardwareInterface
void init ()
 

Detailed Description

Hardware WLAN Interface.

This class adapts a real, hardware based WLAN interface into the NetEmu interface API.

See also
WirelessInterface

Definition at line 42 of file HardwareWLANInterface.hh.

Member Typedef Documentation

◆ Decorator

Constructor & Destructor Documentation

◆ HardwareWLANInterface()

senf::emu::HardwareWLANInterface::HardwareWLANInterface ( std::pair< std::string, std::string >  interfaces)
explicit

Definition at line 152 of file HardwareWLANInterface.cc.

◆ ~HardwareWLANInterface()

senf::emu::HardwareWLANInterface::~HardwareWLANInterface ( )
virtual

Definition at line 306 of file HardwareWLANInterface.cc.

Member Function Documentation

◆ airTime()

void senf::emu::HardwareWLANInterface::airTime ( bool  a)

Definition at line 1311 of file HardwareWLANInterface.cc.

◆ cacAborted()

void senf::emu::HardwareWLANInterface::cacAborted ( )

Definition at line 1440 of file HardwareWLANInterface.cc.

◆ cellJoined()

bool senf::emu::HardwareWLANInterface::cellJoined ( ) const

Definition at line 542 of file HardwareWLANInterface.cc.

◆ dfsState()

std::pair< senf::emu::WirelessNLController::DFSState::Enum, std::uint32_t > senf::emu::HardwareWLANInterface::dfsState ( unsigned  freq,
unsigned  bw 
)

Definition at line 1346 of file HardwareWLANInterface.cc.

◆ dumpFilterStats()

void senf::emu::HardwareWLANInterface::dumpFilterStats ( std::ostream &  os)

Definition at line 1009 of file HardwareWLANInterface.cc.

◆ dumpMmapStats()

void senf::emu::HardwareWLANInterface::dumpMmapStats ( std::ostream &  os)

Definition at line 1015 of file HardwareWLANInterface.cc.

◆ dumpSurvey()

void senf::emu::HardwareWLANInterface::dumpSurvey ( std::ostream &  os)

Definition at line 1462 of file HardwareWLANInterface.cc.

◆ dumpWifiStatistics()

void senf::emu::HardwareWLANInterface::dumpWifiStatistics ( std::ostream &  os)

Definition at line 1336 of file HardwareWLANInterface.cc.

◆ filterStats()

senf::emu::MonitorDataFilterStatistics senf::emu::HardwareWLANInterface::filterStats ( )

Definition at line 999 of file HardwareWLANInterface.cc.

◆ frequencyHint()

void senf::emu::HardwareWLANInterface::frequencyHint ( unsigned  bandwidth)

Definition at line 1304 of file HardwareWLANInterface.cc.

◆ frequencyOffset() [1/2]

int senf::emu::HardwareWLANInterface::frequencyOffset ( ) const

◆ frequencyOffset() [2/2]

void senf::emu::HardwareWLANInterface::frequencyOffset ( int  offset)

Definition at line 1045 of file HardwareWLANInterface.cc.

◆ getScan()

void senf::emu::HardwareWLANInterface::getScan ( std::ostream &  os)

Definition at line 1479 of file HardwareWLANInterface.cc.

◆ htMode() [1/2]

void senf::emu::HardwareWLANInterface::htMode ( HTMode::Enum  mode)

Definition at line 1074 of file HardwareWLANInterface.cc.

◆ htMode() [2/2]

senf::emu::HardwareWLANInterface::HTMode::Enum senf::emu::HardwareWLANInterface::htMode ( ) const

Definition at line 1068 of file HardwareWLANInterface.cc.

◆ isDead()

bool senf::emu::HardwareWLANInterface::isDead ( ) const

Definition at line 1037 of file HardwareWLANInterface.cc.

◆ joinAdhoc()

senf::emu::WirelessNLController::IbssJoinParameters::ptrI senf::emu::HardwareWLANInterface::joinAdhoc ( std::string const &  ssid,
unsigned int  freq,
unsigned int  bandwidth,
bool &  success 
)

Definition at line 1095 of file HardwareWLANInterface.cc.

◆ joinMesh()

senf::emu::WirelessNLController::MeshJoinParameters::ptrM senf::emu::HardwareWLANInterface::joinMesh ( std::string const &  meshId,
unsigned int  freq,
unsigned int  bandwidth,
bool &  success 
)

Definition at line 1127 of file HardwareWLANInterface.cc.

◆ leaveCell()

void senf::emu::HardwareWLANInterface::leaveCell ( )

Definition at line 1222 of file HardwareWLANInterface.cc.

◆ maxBurst() [1/2]

unsigned senf::emu::HardwareWLANInterface::maxBurst ( ) const

Definition at line 1293 of file HardwareWLANInterface.cc.

◆ maxBurst() [2/2]

void senf::emu::HardwareWLANInterface::maxBurst ( unsigned  maxBurst)

Definition at line 1299 of file HardwareWLANInterface.cc.

◆ modulationSet()

void senf::emu::HardwareWLANInterface::modulationSet ( std::set< ModulationParameter::id_t > const &  ids = {})

Definition at line 808 of file HardwareWLANInterface.cc.

◆ monitorDevice()

std::string const & senf::emu::HardwareWLANInterface::monitorDevice ( ) const

Get current monitor interface.

Definition at line 456 of file HardwareWLANInterface.cc.

◆ monitorDropUnknownMCS()

void senf::emu::HardwareWLANInterface::monitorDropUnknownMCS ( bool  q)

Definition at line 1004 of file HardwareWLANInterface.cc.

◆ pvid() [1/2]

VLanId const& senf::emu::HardwareWLANInterface::pvid ( ) const

◆ pvid() [2/2]

bool senf::emu::HardwareWLANInterface::pvid ( VLanId const &  p,
bool  accessMode 
)

Definition at line 689 of file HardwareWLANInterface.cc.

◆ qlen() [1/2]

unsigned senf::emu::HardwareWLANInterface::qlen ( ) const

Definition at line 1262 of file HardwareWLANInterface.cc.

◆ qlen() [2/2]

void senf::emu::HardwareWLANInterface::qlen ( unsigned  qlen)

Definition at line 1268 of file HardwareWLANInterface.cc.

◆ radarEvent()

senf::emu::WirelessNLController::NetlinkEvent< senf::emu::RadarEvent > & senf::emu::HardwareWLANInterface::radarEvent ( )

Definition at line 1447 of file HardwareWLANInterface.cc.

◆ rcvBuf() [1/2]

unsigned senf::emu::HardwareWLANInterface::rcvBuf ( )

Definition at line 1256 of file HardwareWLANInterface.cc.

◆ rcvBuf() [2/2]

void senf::emu::HardwareWLANInterface::rcvBuf ( unsigned  rcvbuf)

Definition at line 1249 of file HardwareWLANInterface.cc.

◆ refreshProperties()

void senf::emu::HardwareWLANInterface::refreshProperties ( )

Definition at line 437 of file HardwareWLANInterface.cc.

◆ restrictBand() [1/2]

void senf::emu::HardwareWLANInterface::restrictBand ( WirelessNLController::Band_t  band)

Definition at line 1054 of file HardwareWLANInterface.cc.

◆ restrictBand() [2/2]

void senf::emu::HardwareWLANInterface::restrictBand ( )

Definition at line 1061 of file HardwareWLANInterface.cc.

◆ rxDropped()

std::pair< unsigned, unsigned > senf::emu::HardwareWLANInterface::rxDropped ( )

Definition at line 1279 of file HardwareWLANInterface.cc.

◆ scanEvent()

senf::emu::WirelessNLController::NetlinkEvent< senf::emu::ScanEvent > & senf::emu::HardwareWLANInterface::scanEvent ( )

Definition at line 1452 of file HardwareWLANInterface.cc.

◆ setCellJoined()

void senf::emu::HardwareWLANInterface::setCellJoined ( unsigned  bandwidth)

Definition at line 1158 of file HardwareWLANInterface.cc.

◆ setREDFilterCallbackRx()

void senf::emu::HardwareWLANInterface::setREDFilterCallbackRx ( senf::ppi::REDFilterCallback const &  cb)

◆ setREDFilterCallbackRxMonitor()

void senf::emu::HardwareWLANInterface::setREDFilterCallbackRxMonitor ( senf::ppi::REDFilterCallback const &  cb)

◆ setREDFilterCallbackTx()

void senf::emu::HardwareWLANInterface::setREDFilterCallbackTx ( senf::ppi::REDFilterCallback const &  cb)

◆ sndBuf() [1/2]

unsigned senf::emu::HardwareWLANInterface::sndBuf ( )

Definition at line 1243 of file HardwareWLANInterface.cc.

◆ sndBuf() [2/2]

void senf::emu::HardwareWLANInterface::sndBuf ( unsigned  sndbuf)

Definition at line 1236 of file HardwareWLANInterface.cc.

◆ spectralScanCallback() [1/2]

void senf::emu::HardwareWLANInterface::spectralScanCallback ( AthSpectralScan::AthSpectralScanCallback const &  cb)

Definition at line 1316 of file HardwareWLANInterface.cc.

◆ spectralScanCallback() [2/2]

void senf::emu::HardwareWLANInterface::spectralScanCallback ( )

Definition at line 1321 of file HardwareWLANInterface.cc.

◆ spectralScanStats()

void senf::emu::HardwareWLANInterface::spectralScanStats ( std::ostream &  os)

Definition at line 1326 of file HardwareWLANInterface.cc.

◆ startCAC()

void senf::emu::HardwareWLANInterface::startCAC ( unsigned int  freq,
unsigned int  bandwidth 
)

Definition at line 1408 of file HardwareWLANInterface.cc.

◆ statisticsMap()

senf::emu::WifiStatisticsMap const & senf::emu::HardwareWLANInterface::statisticsMap ( std::uint32_t  tag,
senf::ClockService::clock_type const &  maxAge 
)

Definition at line 1331 of file HardwareWLANInterface.cc.

◆ triggerScan()

void senf::emu::HardwareWLANInterface::triggerScan ( std::ostream &  os,
std::set< WirelessNLController::frequency_type > const &  frequencies 
)

Definition at line 1473 of file HardwareWLANInterface.cc.

◆ txDropped()

std::tuple< unsigned, unsigned, unsigned > senf::emu::HardwareWLANInterface::txDropped ( )

Definition at line 1288 of file HardwareWLANInterface.cc.

◆ v_device()

std::string const & senf::emu::HardwareWLANInterface::v_device ( ) const
overridevirtual

Get name of physical device.

Implements senf::emu::Interface.

Definition at line 450 of file HardwareWLANInterface.cc.

◆ vlanMismatchRx()

std::uint32_t senf::emu::HardwareWLANInterface::vlanMismatchRx ( )

Definition at line 714 of file HardwareWLANInterface.cc.

◆ vlanMismatchTx()

std::uint32_t senf::emu::HardwareWLANInterface::vlanMismatchTx ( )

Definition at line 719 of file HardwareWLANInterface.cc.

◆ wirelessNLController()

senf::emu::WirelessNLController & senf::emu::HardwareWLANInterface::wirelessNLController ( )

Definition at line 1457 of file HardwareWLANInterface.cc.

Member Data Documentation

◆ netctl_

NetdeviceController senf::emu::HardwareWLANInterface::netctl_
protected

Definition at line 142 of file HardwareWLANInterface.hh.

◆ wnlc_

WirelessNLController senf::emu::HardwareWLANInterface::wnlc_
mutableprotected

Definition at line 143 of file HardwareWLANInterface.hh.


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