Lines Matching refs:nlh
454 struct nlmsghdr *nlh; member
568 static inline void *nlmsg_data(const struct nlmsghdr *nlh) in nlmsg_data() argument
570 return (unsigned char *) nlh + NLMSG_HDRLEN; in nlmsg_data()
577 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() argument
579 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
587 static inline struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, in nlmsg_attrdata() argument
590 unsigned char *data = nlmsg_data(nlh); in nlmsg_attrdata()
599 static inline int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_attrlen() argument
601 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen); in nlmsg_attrlen()
609 static inline int nlmsg_ok(const struct nlmsghdr *nlh, int remaining) in nlmsg_ok() argument
612 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok()
613 nlh->nlmsg_len <= remaining); in nlmsg_ok()
625 nlmsg_next(const struct nlmsghdr *nlh, int *remaining) in nlmsg_next() argument
627 int totlen = NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_next()
631 return (struct nlmsghdr *) ((unsigned char *) nlh + totlen); in nlmsg_next()
722 static inline int __nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, in __nlmsg_parse() argument
728 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) { in __nlmsg_parse()
733 return __nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen), in __nlmsg_parse()
734 nlmsg_attrlen(nlh, hdrlen), policy, validate, in __nlmsg_parse()
748 static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, in nlmsg_parse() argument
753 return __nlmsg_parse(nlh, hdrlen, tb, maxtype, policy, in nlmsg_parse()
767 static inline int nlmsg_parse_deprecated(const struct nlmsghdr *nlh, int hdrlen, in nlmsg_parse_deprecated() argument
772 return __nlmsg_parse(nlh, hdrlen, tb, maxtype, policy, in nlmsg_parse_deprecated()
787 nlmsg_parse_deprecated_strict(const struct nlmsghdr *nlh, int hdrlen, in nlmsg_parse_deprecated_strict() argument
792 return __nlmsg_parse(nlh, hdrlen, tb, maxtype, policy, in nlmsg_parse_deprecated_strict()
804 static inline struct nlattr *nlmsg_find_attr(const struct nlmsghdr *nlh, in nlmsg_find_attr() argument
807 return nla_find(nlmsg_attrdata(nlh, hdrlen), in nlmsg_find_attr()
808 nlmsg_attrlen(nlh, hdrlen), attrtype); in nlmsg_find_attr()
865 static inline int nlmsg_validate_deprecated(const struct nlmsghdr *nlh, in nlmsg_validate_deprecated() argument
870 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) in nlmsg_validate_deprecated()
873 return __nla_validate(nlmsg_attrdata(nlh, hdrlen), in nlmsg_validate_deprecated()
874 nlmsg_attrlen(nlh, hdrlen), maxtype, in nlmsg_validate_deprecated()
886 static inline int nlmsg_report(const struct nlmsghdr *nlh) in nlmsg_report() argument
888 return nlh ? !!(nlh->nlmsg_flags & NLM_F_ECHO) : 0; in nlmsg_report()
898 #define nlmsg_for_each_attr(pos, nlh, hdrlen, rem) \ argument
899 nla_for_each_attr(pos, nlmsg_attrdata(nlh, hdrlen), \
900 nlmsg_attrlen(nlh, hdrlen), rem)
939 return nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in nlmsg_put_answer()
965 static inline void nlmsg_end(struct sk_buff *skb, struct nlmsghdr *nlh) in nlmsg_end() argument
967 nlh->nlmsg_len = skb_tail_pointer(skb) - (unsigned char *)nlh; in nlmsg_end()
1004 static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) in nlmsg_cancel() argument
1006 nlmsg_trim(skb, nlh); in nlmsg_cancel()
1086 struct nlmsghdr *nlh) in nl_dump_check_consistent() argument
1089 nlh->nlmsg_flags |= NLM_F_DUMP_INTR; in nl_dump_check_consistent()