diff options
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r-- | include/net/genetlink.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 6c92415311ca..0574abd3db86 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -211,6 +211,23 @@ static inline struct nlmsghdr *genlmsg_nlhdr(void *user_hdr, | |||
211 | } | 211 | } |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * genlmsg_parse - parse attributes of a genetlink message | ||
215 | * @nlh: netlink message header | ||
216 | * @family: genetlink message family | ||
217 | * @tb: destination array with maxtype+1 elements | ||
218 | * @maxtype: maximum attribute type to be expected | ||
219 | * @policy: validation policy | ||
220 | * */ | ||
221 | static inline int genlmsg_parse(const struct nlmsghdr *nlh, | ||
222 | const struct genl_family *family, | ||
223 | struct nlattr *tb[], int maxtype, | ||
224 | const struct nla_policy *policy) | ||
225 | { | ||
226 | return nlmsg_parse(nlh, family->hdrsize + GENL_HDRLEN, tb, maxtype, | ||
227 | policy); | ||
228 | } | ||
229 | |||
230 | /** | ||
214 | * genl_dump_check_consistent - check if sequence is consistent and advertise if not | 231 | * genl_dump_check_consistent - check if sequence is consistent and advertise if not |
215 | * @cb: netlink callback structure that stores the sequence number | 232 | * @cb: netlink callback structure that stores the sequence number |
216 | * @user_hdr: user header as returned from genlmsg_put() | 233 | * @user_hdr: user header as returned from genlmsg_put() |
@@ -250,9 +267,9 @@ static inline void *genlmsg_put_reply(struct sk_buff *skb, | |||
250 | * @skb: socket buffer the message is stored in | 267 | * @skb: socket buffer the message is stored in |
251 | * @hdr: user specific header | 268 | * @hdr: user specific header |
252 | */ | 269 | */ |
253 | static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | 270 | static inline void genlmsg_end(struct sk_buff *skb, void *hdr) |
254 | { | 271 | { |
255 | return nlmsg_end(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 272 | nlmsg_end(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); |
256 | } | 273 | } |
257 | 274 | ||
258 | /** | 275 | /** |