Testing ...
FossilOrigin-Name: 999caf53552b7c715dae435715917e98c4b88f19e9afdc5e1cda30c88e97e3d6
This commit is contained in:
20
src/nlt/nlt_parse.c
Normal file
20
src/nlt/nlt_parse.c
Normal 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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user