• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/include/net/

Lines Matching refs:nlh

20  *   nlmsg_data(nlh)---^                   ^
21 * nlmsg_next(nlh)-----------------------+
24 * <---------------------- nlmsg_len(nlh) --------------------->
25 * <------ hdrlen ------> <- nlmsg_attrlen(nlh, hdrlen) ->
29 * nlmsg_attrdata(nlh, hdrlen)---^
55 * nlmsg_data(nlh) head of message payload
56 * nlmsg_len(nlh) length of message payload
57 * nlmsg_attrdata(nlh, hdrlen) head of attributes data
58 * nlmsg_attrlen(nlh, hdrlen) length of attributes data
61 * nlmsg_ok(nlh, remaining) does nlh fit into remaining bytes?
62 * nlmsg_next(nlh, remaining) get next netlink message
212 * @nlh: Netlink message header of original request
216 struct nlmsghdr *nlh;
291 * @nlh: netlink messsage header
293 static inline void *nlmsg_data(const struct nlmsghdr *nlh)
295 return (unsigned char *) nlh + NLMSG_HDRLEN;
300 * @nlh: netlink message header
302 static inline int nlmsg_len(const struct nlmsghdr *nlh)
304 return nlh->nlmsg_len - NLMSG_HDRLEN;
309 * @nlh: netlink message header
312 static inline struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh,
315 unsigned char *data = nlmsg_data(nlh);
321 * @nlh: netlink message header
324 static inline int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen)
326 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen);
331 * @nlh: netlink message header
334 static inline int nlmsg_ok(const struct nlmsghdr *nlh, int remaining)
337 nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
338 nlh->nlmsg_len <= remaining);
343 * @nlh: netlink message header
349 static inline struct nlmsghdr *nlmsg_next(struct nlmsghdr *nlh, int *remaining)
351 int totlen = NLMSG_ALIGN(nlh->nlmsg_len);
355 return (struct nlmsghdr *) ((unsigned char *) nlh + totlen);
360 * @nlh: netlink message header
368 static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,
372 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
375 return nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen),
376 nlmsg_attrlen(nlh, hdrlen), policy);
381 * @nlh: netlink message header
387 static inline struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh,
390 return nla_find(nlmsg_attrdata(nlh, hdrlen),
391 nlmsg_attrlen(nlh, hdrlen), attrtype);
396 * @nlh: netlinket message header
401 static inline int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype,
404 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
407 return nla_validate(nlmsg_attrdata(nlh, hdrlen),
408 nlmsg_attrlen(nlh, hdrlen), maxtype, policy);
413 * @nlh: netlink message header
417 static inline int nlmsg_report(const struct nlmsghdr *nlh)
419 return !!(nlh->nlmsg_flags & NLM_F_ECHO);
425 * @nlh: netlink message header
429 #define nlmsg_for_each_attr(pos, nlh, hdrlen, rem) \
430 nla_for_each_attr(pos, nlmsg_attrdata(nlh, hdrlen), \
431 nlmsg_attrlen(nlh, hdrlen), rem)
471 return nlmsg_put(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
491 * @nlh: netlink message header
499 static inline int nlmsg_end(struct sk_buff *skb, struct nlmsghdr *nlh)
501 nlh->nlmsg_len = skb_tail_pointer(skb) - (unsigned char *)nlh;
533 * @nlh: netlink message header
538 static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh)
540 nlmsg_trim(skb, nlh);