diff options
author | Thomas Graf <tgraf@redhat.com> | 2012-05-31 13:13:50 +0200 |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-05-31 13:13:50 +0200 |
commit | 71b442b955075d61abe157724541a967811f6bbe (patch) | |
tree | 32eb6b7f6fc6865c1d2507cfe10af200316010b8 | |
parent | 0b70de5155ba74f152ebece230659e7890cccbd9 (diff) | |
download | libnl-71b442b955075d61abe157724541a967811f6bbe.tar.gz |
genl: Add genlmsg_hdr()
Explicit function to calculate the genl hdr based on nlh
-rw-r--r-- | lib/genl/genl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/genl/genl.c b/lib/genl/genl.c index efe1996..8f2e496 100644 --- a/lib/genl/genl.c +++ b/lib/genl/genl.c @@ -202,6 +202,17 @@ int genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[], } /** + * 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 * |