21 #include <sys/types.h> 22 #include <sys/socket.h> 23 #include <sys/ioctl.h> 27 #include <linux/wireless.h> 51 bzero(&req,
sizeof(req));
53 return (((
double)req.u.freq.m) * pow(10,req.u.freq.e)) / 1000;
60 bzero(&req,
sizeof(req));
61 char essid[IW_ESSID_MAX_SIZE + 1];
62 req.u.essid.pointer = (caddr_t)essid;
63 req.u.essid.length = IW_ESSID_MAX_SIZE;
64 req.u.essid.flags = 0;
66 essid[req.u.essid.length] = 0;
67 return std::string(essid);
74 bzero(&req,
sizeof(req));
79 prefix_ void senf::emu::WirelessExtController::doIoctl(
int ctl,
struct iwreq *
data)
82 strncpy(data->ifr_name, ifname_.c_str(), IFNAMSIZ-1);
83 data->ifr_name[IFNAMSIZ-1] = 0;
84 if (ioctl(sockfd_->fd, ctl, data) < 0)
senf::MACAddress cellId() const
#define SENF_THROW_SYSTEM_EXCEPTION(desc)
WirelessExtController public header.
u8 data[SPECTRAL_HT20_NUM_BINS]
WirelessExtController(std::string const &ifname)
frequency_type frequency() const
#define doIoctl(ifr, errorMsg)
static MACAddress from_data(InputIterator i)