aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r--include/net/netlink.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index b154b81d9a7a..bf593eb59e1b 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -65,6 +65,9 @@
65 * nlmsg_validate() validate netlink message incl. attrs 65 * nlmsg_validate() validate netlink message incl. attrs
66 * nlmsg_for_each_attr() loop over all attributes 66 * nlmsg_for_each_attr() loop over all attributes
67 * 67 *
68 * Misc:
69 * nlmsg_report() report back to application?
70 *
68 * ------------------------------------------------------------------------ 71 * ------------------------------------------------------------------------
69 * Attributes Interface 72 * Attributes Interface
70 * ------------------------------------------------------------------------ 73 * ------------------------------------------------------------------------
@@ -194,6 +197,9 @@ extern void netlink_run_queue(struct sock *sk, unsigned int *qlen,
194 struct nlmsghdr *, int *)); 197 struct nlmsghdr *, int *));
195extern void netlink_queue_skip(struct nlmsghdr *nlh, 198extern void netlink_queue_skip(struct nlmsghdr *nlh,
196 struct sk_buff *skb); 199 struct sk_buff *skb);
200extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb,
201 u32 pid, unsigned int group, int report,
202 gfp_t flags);
197 203
198extern int nla_validate(struct nlattr *head, int len, int maxtype, 204extern int nla_validate(struct nlattr *head, int len, int maxtype,
199 struct nla_policy *policy); 205 struct nla_policy *policy);
@@ -376,6 +382,17 @@ static inline int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype,
376} 382}
377 383
378/** 384/**
385 * nlmsg_report - need to report back to application?
386 * @nlh: netlink message header
387 *
388 * Returns 1 if a report back to the application is requested.
389 */
390static inline int nlmsg_report(struct nlmsghdr *nlh)
391{
392 return !!(nlh->nlmsg_flags & NLM_F_ECHO);
393}
394
395/**
379 * nlmsg_for_each_attr - iterate over a stream of attributes 396 * nlmsg_for_each_attr - iterate over a stream of attributes
380 * @pos: loop counter, set to current attribute 397 * @pos: loop counter, set to current attribute
381 * @nlh: netlink message header 398 * @nlh: netlink message header