You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
920 B

#ifndef LIBIP_WIRELESS_H
#define LIBIP_WIRELESS_H
#include <QObject>
#include <QMap>
#include "libip_global.h"
class LIBIP_EXPORT Wireless : public QObject {
Q_OBJECT
public:
Wireless(QString interface = QString());
const QString& name() const;
const QMap<int, int>& channels() const;
static int ChanToFreq(int in_chan);
static int FreqToChan(int in_freq);
private:
QString m_interface;
QMap<int, int> m_channels;
static int nl80211_freqlist_cb(struct nl_msg *msg, void *arg);
static int nl80211_error_cb(struct sockaddr_nl *nla, struct nlmsgerr *err, void *arg);
static int nl80211_finish_cb(struct nl_msg *msg, void *arg);
static char* nl80211_find_parent(const char *interface);
static void nl80211_disconnect(void *handle, struct nl_cache *cache);
static int nl80211_connect(const char *interface, void **handle, struct nl_cache **cache, void **family);
};
#endif // LIBIP_WIRELESS_H