From: Joe Stringer <joestringer@nicira.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, dev@openvswitch.org, pshelar@nicira.com
Subject: [PATCH net-next v13 4/5] genetlink: Add genlmsg_parse() helper function.
Date: Tue, 20 Jan 2015 10:32:51 -0800 [thread overview]
Message-ID: <1421778772-11879-5-git-send-email-joestringer@nicira.com> (raw)
In-Reply-To: <1421778772-11879-1-git-send-email-joestringer@nicira.com>
The first user will be the next patch.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
---
include/net/genetlink.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index f24aa83..d5a9a8b 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -206,6 +206,23 @@ static inline struct nlmsghdr *genlmsg_nlhdr(void *user_hdr,
}
/**
+ * genlmsg_parse - parse attributes of a genetlink message
+ * @nlh: netlink message header
+ * @family: genetlink message family
+ * @tb: destination array with maxtype+1 elements
+ * @maxtype: maximum attribute type to be expected
+ * @policy: validation policy
+ * */
+static inline int genlmsg_parse(const struct nlmsghdr *nlh,
+ const struct genl_family *family,
+ struct nlattr *tb[], int maxtype,
+ const struct nla_policy *policy)
+{
+ return nlmsg_parse(nlh, family->hdrsize + GENL_HDRLEN, tb, maxtype,
+ policy);
+}
+
+/**
* genl_dump_check_consistent - check if sequence is consistent and advertise if not
* @cb: netlink callback structure that stores the sequence number
* @user_hdr: user header as returned from genlmsg_put()
--
1.7.10.4
next prev parent reply other threads:[~2015-01-20 18:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 18:32 [PATCH net-next v13 0/5] openvswitch: Introduce 128-bit unique flow identifiers Joe Stringer
2015-01-20 18:32 ` [PATCH net-next v13 1/5] openvswitch: Refactor ovs_nla_fill_match() Joe Stringer
2015-01-20 18:32 ` [PATCH net-next v13 2/5] openvswitch: Refactor ovs_flow_tbl_insert() Joe Stringer
2015-01-20 18:32 ` [PATCH net-next v13 3/5] openvswitch: Use sw_flow_key_range for key ranges Joe Stringer
2015-01-20 18:32 ` Joe Stringer [this message]
2015-01-20 18:32 ` [PATCH net-next v13 5/5] openvswitch: Add support for unique flow IDs Joe Stringer
2015-01-21 18:31 ` Pravin Shelar
[not found] ` <CALnjE+qHjf5djBybPQUzoR_+dxDskQJQwtgvSN=G5NW9pckETw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-21 19:29 ` Joe Stringer
2015-01-21 23:41 ` Pravin Shelar
2015-01-22 0:45 ` Joe Stringer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421778772-11879-5-git-send-email-joestringer@nicira.com \
--to=joestringer@nicira.com \
--cc=dev@openvswitch.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox