22 #include <linux/filter.h> 24 #include <boost/icl/interval_set.hpp> 35 #define MHZ_TO_KHZ(freq) ((freq) * 1000) 37 #define IGNORE_EXCPETION(expr) \ 40 } catch (std::exception &) {}; 45 prefix_ senf::emu::detail::HardwareWLANInterfaceNet::HardwareWLANInterfaceNet()
49 annotatorRx_(true, true), annotatorTx_(false, true),
52 netOutput (monitorDataFilter.output), netInput (annotatorTx_.input)
54 ppi::connect(source, annotatorRx_.input);
55 ppi::connect(annotatorRx_.output, monitorDataFilter.input_plain);
56 ppi::connect(monSource, monitorDataFilter);
57 ppi::connect(annotatorTx_.output, sink.input);
62 monSocket = monSocket_;
63 monSource.handle(monSocket);
69 source.handle(socket);
73 prefix_ void senf::emu::detail::HardwareWLANInterfaceNet::dataSource(
bool on)
76 source.handle(socket);
80 monitorDataFilter.flushQueues();
88 prefix_ unsigned senf::emu::detail::HardwareWLANInterfaceNet::rcvBuf()
91 return socket.protocol().rcvbuf();
95 prefix_ void senf::emu::detail::HardwareWLANInterfaceNet::rcvBuf(
unsigned rcvbuf)
98 socket.protocol().rcvbuf(rcvbuf);
101 prefix_ unsigned senf::emu::detail::HardwareWLANInterfaceNet::sndBuf()
104 return socket.protocol().sndbuf();
108 prefix_ void senf::emu::detail::HardwareWLANInterfaceNet::sndBuf(
unsigned sndbuf)
111 socket.protocol().sndbuf(sndbuf);
114 prefix_ void senf::emu::detail::HardwareWLANInterfaceNet::flush()
120 monitorDataFilter.flushQueues();
125 return monitorDataFilter.tsftHistogram();
133 struct DisableInterfaceGuard
136 : iface_ (iface), enabled_ (iface_.enabled())
137 {
if (enabled_) iface_.disable(); }
139 ~DisableInterfaceGuard()
140 {
if (enabled_) iface_.enable(); }
147 namespace senf {
namespace emu {
153 :
WLANInterface(detail::HardwareWLANInterfaceNet::netOutput, detail::HardwareWLANInterfaceNet::netInput),
154 netctl_(interfaces.first), wnlc_(interfaces.first), dev_(interfaces.first), monitorDev_ (interfaces.second), spectralScanner_(wnlc_.phyName()),
155 wifiStatistics_(monitorDevice()), frequencyOffset_(0), restrictedBand_(-1), htMode_(
HTMode::Disabled),
157 rcvBufSize_ (1024), sndBufSize_ (96*1024), qlen_ (512), pvid_(
VLanId::None), accessMode_(false)
162 prefix_ void senf::emu::HardwareWLANInterface::init()
181 registerFrequencies();
182 registerModulations();
188 namespace fty = console::factory;
189 namespace kw = senf::console::kw;
191 .
add(
"tsftHistogram", HardwareWLANInterfaceNet::monitorDataFilter.tsftHistogram().dir);
194 .doc(
"dumps and resets the WLAN Data Filter statistics"));
197 .doc(
"dumps and resets the MMAP RX/TX statistics"));
199 .
add(
"frequencyOffset", fty::Command(
201 .doc(
"set the frequency offset"));
203 .
add(
"frequencyOffset", fty::Command(
205 .overloadDoc(
"get the frequency offset"));
207 .
add(
"restrictBand", fty::Command(
209 .arg(
"band",
"'BAND_2GHZ' or 'BAND_5GHZ'")
210 .doc(
"restrict the registered frequencies to given band") );
212 .
add(
"htMode", fty::Command(
214 .arg(
"mode",
"HT mode")
215 .doc(
"setting HT mode") );
217 .
add(
"htMode", fty::Command(
219 .overloadDoc(
"get HT mode setting") );
221 .
add(
"restrictBand", fty::Command(
223 .overloadDoc(
"clear restriction") );
225 .
add(
"coverageClass", fty::Command(
227 .doc(
"get the coverage class"));
229 .
add(
"coverageClass", fty::Command(
231 .overloadDoc(
"set the coverage class"));
233 .
add(
"monitorDevice", fty::Command(
235 .overloadDoc(
"Get monitor device name.\n" 236 "If the device name is empty, data is read from the normal device" 237 "and no monitor information (SNR, Noise, signal level) is available.") );
239 .
add(
"sndBuf", fty::Command(
241 .doc(
"set the send socket buffer size in bytes"));
243 .
add(
"sndBuf", fty::Command(
245 .doc(
"get the send socket buffer size in bytes"));
247 .
add(
"rcvBuf", fty::Command(
249 .doc(
"set the receive socket buffer size in bytes"));
251 .
add(
"rcvBuf", fty::Command(
253 .doc(
"get the receive socket buffer size in bytes"));
255 .
add(
"qlen", fty::Command(
257 .doc(
"set mmap read queue length in # of packets"));
259 .
add(
"qlen", fty::Command(
261 .doc(
"get mmap read queue length in # of packets"));
263 .
add(
"maxBurst", fty::Command(
265 .doc(
"set max. number to frames to be read in a burst."));
267 .
add(
"maxBurst", fty::Command(
269 .doc(
"set max. number to frames to be read in a burst."));
271 .
add(
"pvid", fty::Command(
273 .doc(
"enables filtering for a specific PVID (VLAN ID must be 0...4095)"));
275 .
add(
"pvid", fty::Command(
277 .doc(
"report the currently configured PVID (-1 means none)"));
280 .doc(
"current spectralScanner stats."));
283 .doc(
"current survey stats"));
286 .doc(
"triggers a fresh scan"));
289 .doc(
"retrieves latest scan results"));
292 .doc(
"Dumps current WifiStatistics."));
313 prefix_ void senf::emu::HardwareWLANInterface::registerFrequencies()
315 typedef boost::icl::interval_set<WirelessNLController::frequency_type> FrequencyRanges;
317 FrequencyRanges frequencyRanges;
319 if (restrictedBand_ < 0)
326 if ((frequencyOffset_ < 0) && (
freq <
unsigned(abs(frequencyOffset_))))
328 frequencyRanges.insert( FrequencyRange(
339 if (boost::icl::contains(frequencyRanges, FrequencyRange(
348 if (boost::icl::contains(frequencyRanges, FrequencyRange(
355 prefix_ void senf::emu::HardwareWLANInterface::registerVHTModulation(
unsigned vhtMcsIndex,
unsigned nss,
unsigned bw,
bool shortGI)
365 for (
size_t nss = 0; nss < vht_mcs_table.size(); nss++) {
367 if (not vht_mcs_table[nss].test(
index))
370 registerVHTModulation(
index, nss, bw,
false);
371 registerVHTModulation(
index, nss, bw,
true);
374 if (vhtCapa.shortGIfor80MHz)
378 if (vhtCapa.shortGIfor160_8080MHz)
385 prefix_ void senf::emu::HardwareWLANInterface::registerModulations()
394 std::set<BitrateParameters::LegacyBitrate> legacyRates;
395 if (bitrates.legacy_24)
396 legacyRates.insert( bitrates.legacy_24->begin(), bitrates.legacy_24->end());
397 if (bitrates.legacy_5)
398 legacyRates.insert( bitrates.legacy_5->begin(), bitrates.legacy_5->end());
406 std::set<BitrateParameters::MCSIndex> mcsIndexes;
408 mcsIndexes.insert( bitrates.mcs_24->begin(), bitrates.mcs_24->end());
410 mcsIndexes.insert( bitrates.mcs_5->begin(), bitrates.mcs_5->end());
417 if (htCapa.rxHT20SGI)
423 if (htCapa.rxHT40SGI)
429 if (bitrates.vht_mcs_table_24)
430 registerModulations_vht(bitrates.vht_mcs_table_24.get());
431 if (bitrates.vht_mcs_table_5)
432 registerModulations_vht(bitrates.vht_mcs_table_5.get());
441 registerFrequencies();
442 registerModulations();
445 prefix_ void senf::emu::HardwareWLANInterface::registerTxPowers()
462 prefix_ void senf::emu::HardwareWLANInterface::init_sockets()
464 monitorDataFilter.id(
id());
465 annotatorRx_.id(
id());
475 prefix_ void senf::emu::HardwareWLANInterface::openMonitorSocket()
478 monSocket_.protocol().rcvbuf( rcvBufSize_);
481 monitorDataFilter.flushQueues();
482 assignMonitorSocket(monSocket_);
485 wifiStatistics_.
enable(
false);
488 prefix_ void senf::emu::HardwareWLANInterface::closeMonitorSocket()
492 if (HardwareWLANInterfaceNet::monSocket.valid())
493 HardwareWLANInterfaceNet::monSocket.close();
497 wifiStatistics_.
enable(
true);
500 prefix_ void senf::emu::HardwareWLANInterface::openDataSocket()
502 std::string vlanDevice (
device() +
"." + senf::str(pvid_));
520 socket_.protocol().rcvbuf( rcvBufSize_);
521 socket_.protocol().sndbuf( sndBufSize_);
523 HardwareWLANInterfaceNet::assignDataSocket(socket_);
527 annotatorRx_.insertTag(pvid_);
528 annotatorTx_.removeTag(pvid_);
530 annotatorRx_.removeTag(pvid_);
531 annotatorTx_.insertTag(pvid_);
534 annotatorRx_.clearTag();
535 annotatorTx_.clearTag();
539 annotatorRx_.promisc(
promisc());
545 return HardwareWLANInterfaceNet::socket.valid();
548 prefix_ void senf::emu::HardwareWLANInterface::closeDataSocket()
561 if (HardwareWLANInterfaceNet::socket.valid())
562 HardwareWLANInterfaceNet::socket.close();
567 prefix_ void senf::emu::HardwareWLANInterface::close_sockets()
569 closeMonitorSocket();
574 prefix_ void senf::emu::HardwareWLANInterface::v_enable()
581 prefix_ void senf::emu::HardwareWLANInterface::v_disable()
586 prefix_ bool senf::emu::HardwareWLANInterface::v_enabled()
594 DisableInterfaceGuard guard (*
this);
596 monitorDataFilter.id(
id);
606 prefix_ bool senf::emu::HardwareWLANInterface::v_promisc()
612 prefix_ void senf::emu::HardwareWLANInterface::v_promisc(
bool p)
620 bool dataSocketOpen (HardwareWLANInterfaceNet::socket.valid());
621 if (dataSocketOpen and pvid_) {
626 monitorDataFilter.promisc(p);
628 if (dataSocketOpen and pvid_) {
635 prefix_ void senf::emu::HardwareWLANInterface::v_annotationMode(
bool a)
637 if (monitorDataFilter.annotate() == a)
640 monitorDataFilter.annotate(a);
646 closeMonitorSocket();
651 prefix_ bool senf::emu::HardwareWLANInterface::v_annotationMode()
654 return monitorDataFilter.annotate();
657 prefix_ void senf::emu::HardwareWLANInterface::v_mcAdd(
MACAddress const & address)
659 HardwareWLANInterfaceNet::socket.protocol().mcAdd( dev_, address);
662 prefix_ void senf::emu::HardwareWLANInterface::v_mcDrop(
MACAddress const & address)
664 HardwareWLANInterfaceNet::socket.protocol().mcDrop( dev_, address);
667 prefix_ unsigned senf::emu::HardwareWLANInterface::v_mtu()
673 prefix_ void senf::emu::HardwareWLANInterface::v_mtu(
unsigned v)
679 prefix_ void senf::emu::HardwareWLANInterface::v_flushRxQueues()
681 HardwareWLANInterfaceNet::flush();
684 prefix_ void senf::emu::HardwareWLANInterface::v_flushTxQueues()
686 HardwareWLANInterfaceNet::sink.flush();
691 if (!accessMode and p.
stag())
694 if (pvid_ == p and accessMode_ == accessMode)
699 bool dataSocketOpen (HardwareWLANInterfaceNet::socket.valid());
700 if (dataSocketOpen) {
705 accessMode_ = accessMode;
707 if (dataSocketOpen) {
716 return HardwareWLANInterfaceNet::annotatorRx_.vlanMismatch();
721 return HardwareWLANInterfaceNet::annotatorTx_.vlanMismatch();
730 prefix_ unsigned senf::emu::HardwareWLANInterface::v_bandwidth()
743 switch (modPara.
type) {
773 switch (modPara.
type) {
805 #undef insertParameterIfTypeMatch 811 std::set<WLANModulationParameter::Type> types;
815 for (
auto const &
id : ids)
818 catch(std::exception & e) {
821 if (types.size() != 1) {
827 switch (*types.begin()) {
842 for (
auto const &
id : ids) {
850 for (
auto const &
id : ids) {
857 std::map<unsigned,unsigned> maxMCS;
858 for (
auto const &
id : ids) {
863 for (
unsigned n = 0; n <= maxMCS[nss]; n++)
871 switch (*types.begin()) {
886 for (
auto const &
id : ids) {
892 for (
auto const &
id : ids) {
899 std::map<unsigned,unsigned> maxMCS;
900 for (
auto const &
id : ids) {
905 if (maxMCS[nss] > 0) {
906 for (
unsigned n = 1; n <= maxMCS[nss]; n++)
919 std::map<unsigned, ModulationParameter::id_t> rates;
920 for (
auto const & i : ids) {
923 modId_ = rates.rbegin()->second;
928 #undef insertParameterIfTypeMatch 935 if (
freq != 0 && bandwidth != 0) {
962 prefix_ unsigned senf::emu::HardwareWLANInterface::v_frequency()
976 prefix_ int senf::emu::HardwareWLANInterface::v_txPower()
982 prefix_ void senf::emu::HardwareWLANInterface::v_txPower(
int power)
988 if (power == txPower_)
1001 return HardwareWLANInterfaceNet::monitorDataFilter.
stats();
1006 HardwareWLANInterfaceNet::monitorDataFilter.dropUnknownMCS(q);
1011 HardwareWLANInterfaceNet::monitorDataFilter.stats().dump(os);
1012 HardwareWLANInterfaceNet::monitorDataFilter.dumpState(os);
1017 if (!HardwareWLANInterfaceNet::socket and !HardwareWLANInterfaceNet::monSocket) {
1018 os <<
"Socket closed. No stats available." << std::endl;
1022 if (HardwareWLANInterfaceNet::monSocket) {
1023 auto rs (HardwareWLANInterfaceNet::monSocket.protocol().rxStats());
1024 os <<
"MMAP Rx (monitor, fd=" << monSocket.protocol().fd() <<
", avail " << socket.protocol().available() <<
") stats: "; rs.dump(os);
1026 auto rs (HardwareWLANInterfaceNet::socket.protocol().rxStats());
1027 os <<
"MMAP Rx (data, fd=" << socket.protocol().fd() <<
", avail " << socket.protocol().available() <<
") stats: "; rs.dump(os);
1029 if (HardwareWLANInterfaceNet::socket) {
1030 auto ts (HardwareWLANInterfaceNet::socket.protocol().txStats());
1031 os <<
"MMAP Tx (data, fd=" << socket.protocol().fd() <<
") stats: "; ts.dump(os);
1040 if (HardwareWLANInterfaceNet::socket)
1041 return socket.protocol().interfaceDead();
1047 if (offset == frequencyOffset_)
1049 frequencyOffset_ = offset;
1051 registerFrequencies();
1056 restrictedBand_ =
band;
1058 registerFrequencies();
1063 restrictedBand_ = -1;
1065 registerFrequencies();
1079 if (htMode_ == mode)
1085 registerFrequencies();
1086 registerModulations();
1089 prefix_ void senf::emu::HardwareWLANInterface::v_coverageRange(
unsigned distance)
1094 prefix_ senf::emu::WirelessNLController::IbssJoinParameters::ptrI
1100 "joinAdhoc (" + ssid +
") failed: Interface (" +
device() +
") is down ", ENETDOWN);
1103 switch (bandwidth) {
1121 return WirelessNLController::IbssJoinParameters::ptrI(
new WirelessNLController::IbssJoinParameters(
1122 membind(&HardwareWLANInterface::do_ibss_join,
this),
1123 ssid, freq-frequencyOffset_, channelMode, success) );
1126 prefix_ senf::emu::WirelessNLController::MeshJoinParameters::ptrM
1132 "joinMesh (" + meshId +
") failed: Interface (" +
device() +
") is down ", ENETDOWN);
1135 switch (bandwidth) {
1153 return WirelessNLController::MeshJoinParameters::ptrM(
new WirelessNLController::MeshJoinParameters(
1154 membind(&HardwareWLANInterface::do_mesh_join,
this),
1155 meshId, freq-frequencyOffset_, channelMode, success) );
1160 if (bandwidth == 0) {
1163 if (bandwidth != 20000 and bandwidth != 40000 and bandwidth != 80000) {
1172 prefix_ void senf::emu::HardwareWLANInterface::do_mesh_join(WirelessNLController::JoinParameters
const & parameters)
1176 wnlc_.do_mesh_join(parameters);
1178 switch (parameters.channelMode_) {
1197 prefix_ void senf::emu::HardwareWLANInterface::do_ibss_join(WirelessNLController::JoinParameters
const & parameters)
1201 wnlc_.do_ibss_join(parameters);
1203 switch (parameters.channelMode_) {
1239 sndBufSize_ =
std::max(sndbuf, 2048u);
1240 HardwareWLANInterfaceNet::sndBuf( sndBufSize_);
1246 return sndBufSize_ = HardwareWLANInterfaceNet::sndBuf();
1252 rcvBufSize_ =
std::max(rcvbuf, 4096u);
1253 HardwareWLANInterfaceNet::rcvBuf( rcvBufSize_);
1259 return rcvBufSize_ = HardwareWLANInterfaceNet::rcvBuf();
1281 if (HardwareWLANInterfaceNet::monSocket) {
1282 return monSource.dropped();
1285 return source.dropped();
1290 return sink.dropped();
1296 return source.maxBurst();
1301 source.maxBurst(maxBurst);
1308 monitorDataFilter.frequency(
freq);
1313 monitorDataFilter.airTime(a);
1328 spectralScanner_.
stats(os);
1338 os <<
"=== Current (cached since last read) WifiStatsitics map, #" << wifiStatistics_.
map().size() <<
" ===" << std::endl;
1339 for (
auto const & m: wifiStatistics_.
map()) {
1341 <<
", signal " << m.second.signal <<
", type " << (unsigned) m.second.type << std::endl;
1348 if (freq == 0 or bandwidth == 0)
1412 "startCAC() failed: Interface (" +
device() +
") is down ", ENETDOWN);
1415 switch (bandwidth) {
1464 os <<
"Lastest survey data, sorted by frequency" << std::endl;
1467 os << survey.frequency <<
": inUse " << survey.inUse <<
", noise " << unsigned(survey.noise) <<
", channelTime " << survey.channelTime
1468 <<
", channelTimeBusy " << survey.channelTimeBusy <<
", channelTimeExtBusy " << survey.channelTimeExtBusy
1469 <<
", channelTimeRx " << survey.channelTimeRx <<
", channelTimeTx " << survey.channelTimeTx << std::endl;
1475 os <<
"Triggering new scan on frequencies " << (frequencies.empty() ?
"all" :
"(" + senf::stringJoin(frequencies,
" ") +
")") << std::endl;
1481 os <<
"Lastest scan data, sorted by bssId" << std::endl;
1484 os << sd.bssId <<
": tsf " << sd.tsf <<
", frequency " << sd.frequency <<
", signal " << sd.signal
1485 <<
", beaconIELength " << sd.beaconInformationElementsLength <<
", IELength " << sd.informationElementsLength << std::endl;
1491 #undef IGNORE_EXCPETION HTMode::Enum htMode() const
bool promisc() const
Get interface promiscuous status.
WirelessNLController::MeshJoinParameters::ptrM joinMesh(std::string const &meshId, unsigned int freq, unsigned int bandwidth, bool &success)
config::time_type clock_type
std::pair< senf::emu::WirelessNLController::DFSState::Enum, std::uint32_t > dfsState(unsigned freq, unsigned bw)
void registerTxPower(int power)
unsigned maxBurst() const
senf::emu::WirelessNLController::NetlinkEvent< ScanEvent > & scanEvent()
VLanId const & pvid() const
void dumpMmapStats(std::ostream &os)
#define SENF_MEMBINDFNP(ret, cls, fn, args)
void addVLAN(std::uint16_t vlanId)
unsigned index() const
Get interface index.
void startCAC(unsigned int freq, unsigned int bandwidth)
static unsigned getRate(std::uint8_t mcsIndex, unsigned bandwidth, bool shortGI)
std::set< MCSIndex > MCSIndexSet
ModulationParameter::id_t parameterIdByMCS_HT(unsigned htMcsIndex, unsigned bandwidth, bool shortGI) const
void set_bitrates(BitrateParameters parameters)
ModulationParameter::id_t parameterIdAuto() const
bool enabled() const
true, if interface enabled
std::tuple< unsigned, unsigned, unsigned > txDropped()
ModulationParameter::id_t parameterIdByLegacyRate(unsigned rate) const
#define SENF_MEMFNP(ret, cls, fn, args)
void flushRxQueues()
Flush Rx Queues.
void frequencyHint(unsigned bandwidth)
void registerFrequency(unsigned frequency, unsigned bandwidth)
register single frequency/bandwidth combination
static unsigned distanceToCoverageClass(unsigned distance)
ChannelWidth channelWidth
std::set< Band_t > const & supportedBands()
virtual ~HardwareWLANInterface()
std::string const & monitorDevice() const
Get current monitor interface.
void do_trigger_scan(std::set< frequency_type > const &frequencies, std::set< std::string > const &ssids={})
WirelessNLController wnlc_
WifiStatisticsMap const & statisticsMap(std::uint32_t tag, senf::ClockService::clock_type const &maxAge)
boost::function< R(Args)> membind(R(T::*fn)(Args), T *ob)
boost::optional< MCSIndexSet > mcs_24
std::string const & v_device() const override
Get name of physical device.
bool enable(bool on=true)
Annotations public header.
void spectralScanStats(std::ostream &os)
std::set< LegacyBitrate > LegacyBitrateSet
bool callback(AthSpectralScanCallback const &cb)
MonitorDataFilterStatistics filterStats()
std::pair< DFSState::Enum, std::uint32_t > dfsState(frequency_type freq)
frequency_type frequency()
BitrateParameters const & bitrates()
Return valid bitrates.
boost::optional< LegacyBitrateSet > legacy_5
void clearRegisteredModulations()
remove all registered modulations
std::array< VHT_MCSBitmap, NL80211_VHT_NSS_MAX > VHT_MCSBitmapTable
NetlinkEvent< ScanEvent > scanEvent
boost::optional< VHT_MCSBitmapTable > vht_mcs_table_24
unsigned rate
Bitrate in kbit/s.
ModulationParameter::id_t parameterIdByMCS_VHT(unsigned vhtMcsIndex, unsigned streams, unsigned bandwidth, bool shortGI) const
console::DirectoryNode & consoleDir() const
Access interface console directory.
std::string const & device() const
std::multiset< ScanResults > const & getScan()
NodeType & add(std::string const &name, boost::shared_ptr< NodeType > node)
WifiStatisticsMap const & map() const
NetlinkEvent< RadarEvent > radarEvent
void set_txpower(TxPowerSetting::Enum setting, unsigned int mBm)
std::function< void(std::uint64_t tsft, std::uint16_t frequency, unsigned numBins, void *spectralSample)> AthSpectralScanCallback
WirelessNLController & wirelessNLController()
std::uint32_t vlanMismatchRx()
void dumpSurvey(std::ostream &os)
boost::optional< MCSIndexSet > mcs_5
void monitorDropUnknownMCS(bool q)
FrequencyRange frequencies()
WirelessNLController::IbssJoinParameters::ptrI joinAdhoc(std::string const &ssid, unsigned int freq, unsigned int bandwidth, bool &success)
VHTCapabilitiesInfo const & vhtCapabilities()
void triggerScan(std::ostream &os, std::set< WirelessNLController::frequency_type > const &frequencies)
ModulationParameter::id_t parameterIdUnknown() const
std::pair< unsigned, unsigned > rxDropped()
void dumpFilterStats(std::ostream &os)
boost::unordered_map< senf::MACAddress, WifiStatisticsData > WifiStatisticsMap
ProtocolClientSocketHandle< ConnectedMMapPacketSocketProtocol< QueueReadPolicy > > ConnectedMMapReadPacketSocketHandle
void dumpWifiStatistics(std::ostream &os)
boost::optional< VHT_MCSBitmapTable > vht_mcs_table_5
MACAddress hardwareAddress() const
void delVLAN(std::uint16_t vlanId)
void setCellJoined(unsigned bandwidth)
senf::emu::WirelessNLController::NetlinkEvent< RadarEvent > & radarEvent()
unsigned bandwidth() const
Get current bandwidth.
void getScan(std::ostream &os)
int frequencyOffset() const
console::DirectoryNode & interfaceDir()
std::uint32_t vlanMismatchTx()
HTCapabilitiesInfo const & htCapabilities()
ProtocolClientSocketHandle< ConnectedMMapPacketSocketProtocol< QueueReadPolicy, QueueWritePolicy > > ConnectedMMapPacketSocketHandle
static WLANModulationParameterRegistry & instance()
std::set< Survey > const & survey()
void frequency(std::uint32_t freq, std::uint32_t bandwidth, std::int32_t offset=0)
WifiStatisticsMap const & statisticsMap(std::uint32_t tag, senf::ClockService::clock_type const &maxAge)
void set_frequency(frequency_type freq, ChannelMode::Enum=ChannelMode::NoHT20)
SENF_CONSOLE_REGISTER_ENUM_MEMBER(HardwareWLANInterface::HTMode, Enum,(Disabled)(Enabled)(HT20only)(HT40only))
MonitorDataFilterStatistics stats()
static void filterMonitorTxFrames(BSDSocket sock)
static SENF_CLOCKSERVICE_CONSTEXPR int64_type in_seconds(clock_type const &v)
void start_radarDetection(unsigned int freq, ChannelMode::Enum=ChannelMode::NoHT20)
std::string const & phyName() const
void coverageClass(unsigned coverage)
void spectralScanCallback()
NetdeviceController netctl_
HardwareWLANInterface(std::pair< std::string, std::string > interfaces)
void modulationSet(std::set< ModulationParameter::id_t > const &ids={})
boost::optional< LegacyBitrateSet > legacy_24
void clearRegisteredFrequencies()
remove all registered frequencies
FrequenciesRange frequencies() const
Get valid frequency intervals.
HardwareWLANInterface public header.
void stats(std::ostream &os)
void registerModulation(ModulationParameter::id_t id)
register modulation configuration
boost::iterator_range< Frequencies_iterator > FrequencyRange
bool hasVHTCapabilities()
#define NL80211_VHT_NSS_MAX