genl: Add genlmsg_hdr()
Explicit function to calculate the genl hdr based on nlh
This commit is contained in:
parent
0b70de5155
commit
71b442b955
1 changed files with 11 additions and 0 deletions
|
@ -201,6 +201,17 @@ int genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
|
|||
genlmsg_attrlen(ghdr, hdrlen), policy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return pointer to Generic Netlink header
|
||||
* @arg nlh Netlink message header
|
||||
*
|
||||
* @return Pointer to Generic Netlink message header
|
||||
*/
|
||||
struct genlmsghdr *genlmsg_hdr(struct nlmsghdr *nlh)
|
||||
{
|
||||
return nlmsg_data(nlh);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return pointer to message payload
|
||||
* @arg gnlh Generic Netlink message header
|
||||
|
|
Loading…
Add table
Reference in a new issue