2014-09-14 22:47:51 +02:00
|
|
|
#ifndef __NLT_H
|
|
|
|
#define __NLT_H
|
|
|
|
|
2014-09-22 06:57:50 +02:00
|
|
|
#include "nl80211.h"
|
2016-02-22 18:33:47 +01:00
|
|
|
#include <netlink/socket.h>
|
2014-09-14 22:47:51 +02:00
|
|
|
|
|
|
|
extern const char * nlt_attrnames[];
|
2014-09-22 06:57:50 +02:00
|
|
|
extern const char * nlt_cmdnames[];
|
2014-09-14 22:47:51 +02:00
|
|
|
|
|
|
|
#define nlt_get_attrname(type) nlt_attrnames[type]
|
2014-09-22 06:57:50 +02:00
|
|
|
#define nlt_get_cmdname(cmd) (cmd>NL80211_CMD_MAX? "Unknown": nlt_cmdnames[cmd])
|
2014-09-14 22:47:51 +02:00
|
|
|
|
2014-12-13 08:59:28 +01:00
|
|
|
struct nlt_ifinfo {
|
|
|
|
const char *ifname;
|
|
|
|
int ifindex;
|
|
|
|
int iftype;
|
|
|
|
};
|
|
|
|
|
2014-09-14 22:47:51 +02:00
|
|
|
|
2014-12-16 09:03:37 +01:00
|
|
|
struct nlt_wiphyinfo {
|
|
|
|
int index;
|
2015-01-03 20:54:43 +01:00
|
|
|
const char * name;
|
2014-12-16 09:03:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int nlt_get_ifinfo(struct nl_sock *sk, struct nlt_ifinfo *ifinfo);
|
|
|
|
int nlt_init_ifinfo(struct nlt_ifinfo * ifinfo);
|
|
|
|
//int nlt_get_wiphy_list(struct nlt_ifinfo * ifinfo);
|
|
|
|
int nlt_get_wiphy_list(struct nl_sock *sk);
|
|
|
|
|
|
|
|
|
2015-01-03 20:54:43 +01:00
|
|
|
|
|
|
|
|
2014-12-16 09:03:37 +01:00
|
|
|
#define NLT_MAX_WIPHYINDEX 8
|
|
|
|
|
2014-09-14 22:47:51 +02:00
|
|
|
#endif
|
|
|
|
|