Lines Matching +full:nested +full:- +full:attributes
1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
4 * NETLINK Netlink attributes
6 * Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
27 int totlen = NLA_ALIGN(nla->nla_len);
29 *remaining -= totlen;
36 nla->nla_len >= sizeof(*nla) &&
37 nla->nla_len <= remaining;
42 return nla->nla_type & NLA_TYPE_MASK;
57 if (pt->type > LIBBPF_NLA_TYPE_MAX)
60 if (pt->minlen)
61 minlen = pt->minlen;
62 else if (pt->type != LIBBPF_NLA_UNSPEC)
63 minlen = nla_attr_minlen[pt->type];
66 return -EINVAL;
68 if (pt->maxlen && libbpf_nla_len(nla) > pt->maxlen)
69 return -EINVAL;
71 if (pt->type == LIBBPF_NLA_STRING) {
74 if (data[libbpf_nla_len(nla) - 1] != '\0')
75 return -EINVAL;
83 return nlh->nlmsg_len - NLMSG_HDRLEN;
87 * Create attribute index based on a stream of attributes.
94 * Iterates over the stream of attributes and stores a pointer to each
136 * Create attribute index based on nested attribute
139 * @arg nla Nested Attribute.
142 * Feeds the stream of attributes nested into the specified attribute
169 if (!(nlh->nlmsg_flags & NLM_F_ACK_TLVS))
176 if (!(nlh->nlmsg_flags & NLM_F_CAPPED))
177 hlen += nlmsg_len(&err->msg);
180 alen = (void *)nlh + nlh->nlmsg_len - (void *)attr;
184 pr_warn("Failed to parse extended error attributes\n");