2016-02-05 17:38:49 +01:00
|
|
|
#ifndef __WIFI_NL80211_HEADER__
|
|
|
|
#define __WIFI_NL80211_HEADER__
|
|
|
|
|
2016-03-30 10:39:04 +02:00
|
|
|
#include <ev.h>
|
|
|
|
|
2016-02-05 17:38:49 +01:00
|
|
|
#include "capwap_hash.h"
|
|
|
|
#include "netlink_link.h"
|
|
|
|
|
|
|
|
/* Compatibility functions */
|
|
|
|
#ifdef HAVE_LIBNL_10
|
|
|
|
#define nl_sock nl_handle
|
|
|
|
#endif
|
|
|
|
|
2016-03-03 16:44:15 +01:00
|
|
|
#define WMM_QOSINFO_STA_AC_MASK 0x0f
|
|
|
|
#define WMM_QOSINFO_STA_SP_MASK 0x03
|
|
|
|
#define WMM_QOSINFO_STA_SP_SHIFT 5
|
|
|
|
|
2016-02-05 17:38:49 +01:00
|
|
|
/* */
|
|
|
|
typedef int (*nl_valid_cb)(struct nl_msg* msg, void* data);
|
|
|
|
|
|
|
|
/* Global handle */
|
|
|
|
struct nl80211_global_handle {
|
2016-03-30 10:39:04 +02:00
|
|
|
int nl80211_id;
|
|
|
|
|
2016-02-05 17:38:49 +01:00
|
|
|
struct nl_sock* nl;
|
|
|
|
struct nl_cb* nl_cb;
|
|
|
|
|
2016-03-30 10:39:04 +02:00
|
|
|
struct nl_sock *nl_event;
|
|
|
|
ev_io nl_event_ev;
|
2016-02-05 17:38:49 +01:00
|
|
|
|
|
|
|
struct netlink* netlinkhandle;
|
|
|
|
|
|
|
|
int sock_util;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Device handle */
|
|
|
|
struct nl80211_device_handle {
|
|
|
|
struct nl80211_global_handle* globalhandle;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* WLAN handle */
|
|
|
|
struct nl80211_wlan_handle {
|
|
|
|
struct nl80211_device_handle* devicehandle;
|
|
|
|
|
2016-03-30 10:39:04 +02:00
|
|
|
struct nl_sock *nl;
|
|
|
|
ev_io nl_ev;
|
|
|
|
struct nl_cb *nl_cb;
|
2016-02-05 17:38:49 +01:00
|
|
|
|
|
|
|
uint64_t last_cookie;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __WIFI_NL80211_HEADER__ */
|