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); in nla_next()
29 *remaining -= totlen; in nla_next()
36 nla->nla_len >= sizeof(*nla) && in nla_ok()
37 nla->nla_len <= remaining; in nla_ok()
42 return nla->nla_type & NLA_TYPE_MASK; in nla_type()
57 if (pt->type > LIBBPF_NLA_TYPE_MAX) in validate_nla()
60 if (pt->minlen) in validate_nla()
61 minlen = pt->minlen; in validate_nla()
62 else if (pt->type != LIBBPF_NLA_UNSPEC) in validate_nla()
63 minlen = nla_attr_minlen[pt->type]; in validate_nla()
66 return -1; in validate_nla()
68 if (pt->maxlen && libbpf_nla_len(nla) > pt->maxlen) in validate_nla()
69 return -1; in validate_nla()
71 if (pt->type == LIBBPF_NLA_STRING) { in validate_nla()
74 if (data[libbpf_nla_len(nla) - 1] != '\0') in validate_nla()
75 return -1; in validate_nla()
83 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
87 * Create attribute index based on a stream of attributes.
94 * Iterates over the stream of attributes and stores a pointer to each
137 * Create attribute index based on nested attribute
140 * @arg nla Nested Attribute.
143 * Feeds the stream of attributes nested into the specified attribute
170 if (!(nlh->nlmsg_flags & NLM_F_ACK_TLVS)) in libbpf_nla_dump_errormsg()
177 if (!(nlh->nlmsg_flags & NLM_F_CAPPED)) in libbpf_nla_dump_errormsg()
178 hlen += nlmsg_len(&err->msg); in libbpf_nla_dump_errormsg()
181 alen = (void *)nlh + nlh->nlmsg_len - (void *)attr; in libbpf_nla_dump_errormsg()
185 pr_warn("Failed to parse extended error attributes\n"); in libbpf_nla_dump_errormsg()