libiwinfo: clear buffer in nl80211_ifname2phy(), prevents running operations against...
[project/luci.git] / contrib / package / iwinfo / src / iwinfo_nl80211.h
index 6c03ca1..4231c94 100644 (file)
 #include <unistd.h>
 #include <string.h>
 #include <dirent.h>
-#include <sys/socket.h>
+#include <signal.h>
 #include <sys/un.h>
-#include <net/if.h>
 #include <netlink/netlink.h>
 #include <netlink/genl/genl.h>
 #include <netlink/genl/family.h>
 #include <netlink/genl/ctrl.h>
 
 #include "iwinfo.h"
+#include "iwinfo_utils.h"
 #include "include/nl80211.h"
 
 struct nl80211_state {
@@ -42,11 +42,8 @@ struct nl80211_state {
 };
 
 struct nl80211_msg_conveyor {
-       int custom_cb;
        struct nl_msg *msg;
        struct nl_cb *cb;
-       struct genlmsghdr *hdr;
-       struct nlattr *attr[NL80211_ATTR_MAX + 1];
 };
 
 struct nl80211_rssi_rate {
@@ -54,9 +51,8 @@ struct nl80211_rssi_rate {
        int8_t  rssi;
 };
 
-struct nl80211_assoc_count {
-       struct iwinfo_assoclist_entry *entry;
-       int noise;
+struct nl80211_array_buf {
+       void *buf;
        int count;
 };
 
@@ -79,6 +75,7 @@ int nl80211_get_txpwrlist(const char *ifname, char *buf, int *len);
 int nl80211_get_scanlist(const char *ifname, char *buf, int *len);
 int nl80211_get_freqlist(const char *ifname, char *buf, int *len);
 int nl80211_get_countrylist(const char *ifname, char *buf, int *len);
+int nl80211_get_hwmodelist(const char *ifname, int *buf);
 int nl80211_get_mbssid_support(const char *ifname, int *buf);
 void nl80211_close(void);