Testing ...

FossilOrigin-Name: 999caf53552b7c715dae435715917e98c4b88f19e9afdc5e1cda30c88e97e3d6
This commit is contained in:
7u83@mail.ru
2016-03-24 01:18:00 +00:00
parent eee6447f77
commit d018af6c22
5 changed files with 4714 additions and 0 deletions

20
src/nlt/nlt_parse.c Normal file
View File

@ -0,0 +1,20 @@
#include <netlink/genl/genl.h>
#include "nlt.h"
int nlt_parse(struct nl_msg *msg, struct nlt_msg *r)
{
struct nlmsghdr *msghdr = nlmsg_hdr(msg);
struct genlmsghdr *ghdr = (struct genlmsghdr *) nlmsg_data(msghdr);
int rc;
rc = nla_parse(r->attribs, NL80211_ATTR_MAX, genlmsg_attrdata(ghdr, 0),
genlmsg_attrlen(ghdr, 0), NULL);
if (rc < 0)
return rc;
r->cmd = ghdr->cmd;
return 0;
}