actube/src/nlt/nlt.h
7u83@mail.ru d018af6c22 Testing ...
FossilOrigin-Name: 999caf53552b7c715dae435715917e98c4b88f19e9afdc5e1cda30c88e97e3d6
2016-03-24 01:18:00 +00:00

47 lines
875 B
C

#ifndef __NLT_H
#define __NLT_H
#include "nl80211.h"
#include <netlink/netlink.h>
#include <netlink/socket.h>
#include "netlink/msg.h"
extern const char * nlt_attrnames[];
extern const char * nlt_cmdnames[];
#define nlt_get_attrname(type) (nlt_attrnames[type])
#define nlt_get_cmdname(cmd) (cmd>NL80211_CMD_MAX? "Unknown": nlt_cmdnames[cmd])
struct nlt_ifinfo {
const char *ifname;
int ifindex;
int iftype;
};
struct nlt_wiphyinfo {
int index;
const char * name;
};
struct nlt_msg {
int cmd;
struct nlattr *attribs[NL80211_ATTR_MAX + 1];
};
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);
extern int nlt_parse(struct nl_msg *msg, struct nlt_msg *r);
#define NLT_MAX_WIPHYINDEX 8
#endif