Lines Matching +full:attribute +full:- +full:set
1 /* SPDX-License-Identifier: GPL-2.0 */
12 * ------------------------------------------------------------------------
14 * ------------------------------------------------------------------------
17 * <--- nlmsg_total_size(payload) --->
18 * <-- nlmsg_msg_size(payload) ->
19 * +----------+- - -+-------------+- - -+-------- - -
21 * +----------+- - -+-------------+- - -+-------- - -
22 * nlmsg_data(nlh)---^ ^
23 * nlmsg_next(nlh)-----------------------+
26 * <---------------------- nlmsg_len(nlh) --------------------->
27 * <------ hdrlen ------> <- nlmsg_attrlen(nlh, hdrlen) ->
28 * +----------------------+- - -+--------------------------------+
30 * +----------------------+- - -+--------------------------------+
31 * nlmsg_attrdata(nlh, hdrlen)---^
67 * nlmsg_find_attr() find an attribute in a message
75 * ------------------------------------------------------------------------
77 * ------------------------------------------------------------------------
79 * Attribute Format:
80 * <------- nla_total_size(payload) ------->
81 * <---- nla_attr_size(payload) ----->
82 * +----------+- - -+- - - - - - - - - +- - -+-------- - -
84 * +----------+- - -+- - - - - - - - - +- - -+-------- - -
85 * <- nla_len(nla) -> ^
86 * nla_data(nla)----^ |
87 * nla_next(nla)-----------------------------'
90 * struct nlattr netlink attribute header
92 * Attribute Construction:
93 * nla_reserve(skb, type, len) reserve room for an attribute
94 * nla_reserve_nohdr(skb, len) reserve room for an attribute w/o hdr
95 * nla_put(skb, type, len, data) add attribute to skb
96 * nla_put_nohdr(skb, len, data) add attribute w/o hdr
99 * Attribute Construction for Basic Types:
100 * nla_put_u8(skb, type, value) add u8 attribute to skb
101 * nla_put_u16(skb, type, value) add u16 attribute to skb
102 * nla_put_u32(skb, type, value) add u32 attribute to skb
104 * value, padattr) add u64 attribute to skb
105 * nla_put_s8(skb, type, value) add s8 attribute to skb
106 * nla_put_s16(skb, type, value) add s16 attribute to skb
107 * nla_put_s32(skb, type, value) add s32 attribute to skb
109 * padattr) add s64 attribute to skb
110 * nla_put_string(skb, type, str) add string attribute to skb
111 * nla_put_flag(skb, type) add flag attribute to skb
113 * padattr) add msecs attribute to skb
114 * nla_put_in_addr(skb, type, addr) add IPv4 address attribute to skb
115 * nla_put_in6_addr(skb, type, addr) add IPv6 address attribute to skb
118 * nla_nest_start(skb, type) start a nested attribute
119 * nla_nest_end(skb, nla) finalize a nested attribute
120 * nla_nest_cancel(skb, nla) cancel nested attribute construction
122 * Attribute Length Calculations:
123 * nla_attr_size(payload) length of attribute w/o padding
124 * nla_total_size(payload) length of attribute w/ padding
127 * Attribute Payload Access:
128 * nla_data(nla) head of attribute payload
129 * nla_len(nla) length of attribute payload
131 * Attribute Payload Access for Basic Types:
132 * nla_get_uint(nla) get payload for a uint attribute
133 * nla_get_sint(nla) get payload for a sint attribute
134 * nla_get_u8(nla) get payload for a u8 attribute
135 * nla_get_u16(nla) get payload for a u16 attribute
136 * nla_get_u32(nla) get payload for a u32 attribute
137 * nla_get_u64(nla) get payload for a u64 attribute
138 * nla_get_s8(nla) get payload for a s8 attribute
139 * nla_get_s16(nla) get payload for a s16 attribute
140 * nla_get_s32(nla) get payload for a s32 attribute
141 * nla_get_s64(nla) get payload for a s64 attribute
143 * nla_get_msecs(nla) get payload for a msecs attribute
147 * Attribute Misc:
148 * nla_memcpy(dest, nla, count) copy attribute into memory
149 * nla_memcmp(nla, data, size) compare attribute with memory area
150 * nla_strscpy(dst, nla, size) copy attribute to a sized string
151 * nla_strcmp(nla, str) compare attribute with string
153 * Attribute Parsing:
155 * nla_next(nla, remaining) get next netlink attribute
158 * nla_find() find attribute in stream of attributes
159 * nla_find_nested() find attribute in nested attributes
172 * Standard attribute types to specify validation policy
200 #define NLA_TYPE_MAX (__NLA_TYPE_MAX - 1)
222 * struct nla_policy - attribute validation policy
223 * @type: Type of attribute or NLA_UNSPEC
224 * @validation_type: type of attribute validation done in addition to
225 * type-specific validation (e.g. range, function call), see
230 * accessible by attribute type up to the highest identifier to be expected.
236 * NLA_BINARY Maximum length of attribute payload
254 * All other Minimum length of attribute payload
257 * NLA_BITFIELD32 This is a 32-bit bitmap/bitselector attribute and
259 * NLA_REJECT This attribute is always rejected and `reject_message'
263 * also set `len' to the max attribute number. Use the
266 * parse, the nested sub-policies.
268 * must also set `len' to the max attribute number. Use
273 * level down and the attribute types directly in the
289 * the value of the integer attribute.
293 * of s16 - do that using the NLA_POLICY_FULL_RANGE()
301 * NLA_U64 If the validation_type field instead is set to
310 * NLA_S64 If the validation_type field instead is set to
318 * integers) of the attribute is enforced.
320 * All other Unused - but note that it's a union
323 * NLA_BINARY Validation function called for the attribute.
324 * All other Unused - but note that it's a union
343 * @strict_start_type: first attribute to validate strictly
345 * This entry is special, and used for the attribute at index 0
348 * starts for any attribute types >= this value, also, strict
357 * For completely new families it should be set to 1 so that the
359 * it should be set at least when new attributes are added to
360 * the enum used by the policy, and be set to the new value that
365 /* private: use NLA_POLICY_*() to set */
388 _NLA_POLICY_NESTED(ARRAY_SIZE(policy) - 1, policy)
390 _NLA_POLICY_NESTED_ARRAY(ARRAY_SIZE(policy) - 1, policy)
477 * struct nl_info - netlink source information
482 * @skip_notify_kernel: Skip selected in-kernel notifications
493 * enum netlink_validation - netlink message/attribute validation levels
494 * @NL_VALIDATE_LIBERAL: Old-style "be liberal" validation, not caring about
497 * @NL_VALIDATE_TRAILING: Reject junk data encountered after attribute parsing.
501 * This can safely be set by the kernel when the given policy has no
504 * @NL_VALIDATE_STRICT_ATTRS: strict attribute policy parsing (e.g.
506 * @NL_VALIDATE_NESTED: Check that NLA_F_NESTED is set for NLA_NESTED(_ARRAY)
569 * nlmsg_msg_size - length of netlink message not including padding
578 * nlmsg_total_size - length of netlink message including padding
587 * nlmsg_padlen - length of padding at the message's tail
592 return nlmsg_total_size(payload) - nlmsg_msg_size(payload); in nlmsg_padlen()
596 * nlmsg_data - head of message payload
605 * nlmsg_len - length of message payload
610 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
614 * nlmsg_attrdata - head of attributes data
626 * nlmsg_attrlen - length of attributes data
632 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen); in nlmsg_attrlen()
636 * nlmsg_ok - check if the netlink message fits into the remaining bytes
643 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok()
644 nlh->nlmsg_len <= remaining); in nlmsg_ok()
648 * nlmsg_next - next netlink message in message stream
658 int totlen = NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_next()
660 *remaining -= totlen; in nlmsg_next()
666 * nla_parse - Parse a stream of attributes into a tb buffer
668 * @maxtype: maximum attribute type to be expected
669 * @head: head of attribute stream
670 * @len: length of attribute stream
674 * Parses a stream of attributes and stores a pointer to each attribute in
675 * the tb array accessible via the attribute type. Attributes with a type
691 * nla_parse_deprecated - Parse a stream of attributes into a tb buffer
693 * @maxtype: maximum attribute type to be expected
694 * @head: head of attribute stream
695 * @len: length of attribute stream
699 * Parses a stream of attributes and stores a pointer to each attribute in
700 * the tb array accessible via the attribute type. Attributes with a type
716 * nla_parse_deprecated_strict - Parse a stream of attributes into a tb buffer
718 * @maxtype: maximum attribute type to be expected
719 * @head: head of attribute stream
720 * @len: length of attribute stream
724 * Parses a stream of attributes and stores a pointer to each attribute in
725 * the tb array accessible via the attribute type. Attributes with a type
742 * __nlmsg_parse - parse attributes of a netlink message
746 * @maxtype: maximum attribute type to be expected
759 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) { in __nlmsg_parse()
761 return -EINVAL; in __nlmsg_parse()
770 * nlmsg_parse - parse attributes of a netlink message
774 * @maxtype: maximum attribute type to be expected
790 * nlmsg_parse_deprecated - parse attributes of a netlink message
794 * @maxtype: maximum attribute type to be expected
810 * nlmsg_parse_deprecated_strict - parse attributes of a netlink message
814 * @maxtype: maximum attribute type to be expected
831 * nlmsg_find_attr - find a specific attribute in a netlink message
834 * @attrtype: type of attribute to look for
836 * Returns: the first attribute which matches the specified type.
846 * nla_validate_deprecated - Validate a stream of attributes
847 * @head: head of attribute stream
848 * @len: length of attribute stream
849 * @maxtype: maximum attribute type to be expected
853 * Validates all attributes in the specified attribute stream against the
869 * nla_validate - Validate a stream of attributes
870 * @head: head of attribute stream
871 * @len: length of attribute stream
872 * @maxtype: maximum attribute type to be expected
876 * Validates all attributes in the specified attribute stream against the
891 * nlmsg_validate_deprecated - validate a netlink message including attributes
894 * @maxtype: maximum attribute type to be expected
903 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) in nlmsg_validate_deprecated()
904 return -EINVAL; in nlmsg_validate_deprecated()
914 * nlmsg_report - need to report back to application?
921 return nlh ? !!(nlh->nlmsg_flags & NLM_F_ECHO) : 0; in nlmsg_report()
925 * nlmsg_seq - return the seq number of netlink message
932 return nlh ? nlh->nlmsg_seq : 0; in nlmsg_seq()
936 * nlmsg_for_each_attr - iterate over a stream of attributes
937 * @pos: loop counter, set to current attribute
947 * nlmsg_put - Add a new netlink message to an skb
968 * nlmsg_append - Add more data to a nlmsg in a skb
973 * with multiple fixed-format headers (which is rare).
982 if (NLMSG_ALIGN(size) - size) in nlmsg_append()
984 NLMSG_ALIGN(size) - size); in nlmsg_append()
989 * nlmsg_put_answer - Add a new callback based netlink message to an skb
1004 return nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in nlmsg_put_answer()
1009 * nlmsg_new - Allocate a new netlink message
1022 * nlmsg_new_large - Allocate a new netlink message with non-contiguous
1026 * The allocated skb is unable to have frag page for shinfo->frags*,
1027 * as the NULL setting for skb->head in netlink_skb_destructor() will
1036 * nlmsg_end - Finalize a netlink message
1046 nlh->nlmsg_len = skb_tail_pointer(skb) - (unsigned char *)nlh; in nlmsg_end()
1050 * nlmsg_get_pos - return current position in netlink message
1061 * nlmsg_trim - Trim message to a mark
1070 WARN_ON((unsigned char *) mark < skb->data); in nlmsg_trim()
1071 skb_trim(skb, (unsigned char *) mark - skb->data); in nlmsg_trim()
1076 * nlmsg_cancel - Cancel construction of a netlink message
1089 * nlmsg_free - drop a netlink message
1098 * nlmsg_consume - free a netlink message
1107 * nlmsg_multicast_filtered - multicast a netlink message with filter function
1137 * nlmsg_multicast - multicast a netlink message
1152 * nlmsg_unicast - unicast a netlink message
1169 * nlmsg_for_each_msg - iterate over a stream of messages
1170 * @pos: loop counter, set to current message
1181 * nl_dump_check_consistent - check if sequence is consistent and advertise if not
1188 * The correct way to use it is to set cb->seq to the generation counter when
1199 if (cb->prev_seq && cb->seq != cb->prev_seq) in nl_dump_check_consistent()
1200 nlh->nlmsg_flags |= NLM_F_DUMP_INTR; in nl_dump_check_consistent()
1201 cb->prev_seq = cb->seq; in nl_dump_check_consistent()
1209 * nla_attr_size - length of attribute not including padding
1218 * nla_total_size - total length of attribute including padding
1227 * nla_padlen - length of padding at the tail of attribute
1232 return nla_total_size(payload) - nla_attr_size(payload); in nla_padlen()
1236 * nla_type - attribute type
1237 * @nla: netlink attribute
1241 return nla->nla_type & NLA_TYPE_MASK; in nla_type()
1245 * nla_data - head of payload
1246 * @nla: netlink attribute
1254 * nla_len - length of payload
1255 * @nla: netlink attribute
1259 return nla->nla_len - NLA_HDRLEN; in nla_len()
1263 * nla_ok - check if the netlink attribute fits into the remaining bytes
1264 * @nla: netlink attribute
1265 * @remaining: number of bytes remaining in attribute stream
1270 nla->nla_len >= sizeof(*nla) && in nla_ok()
1271 nla->nla_len <= remaining; in nla_ok()
1275 * nla_next - next netlink attribute in attribute stream
1276 * @nla: netlink attribute
1277 * @remaining: number of bytes remaining in attribute stream
1279 * Returns: the next netlink attribute in the attribute stream and
1280 * decrements remaining by the size of the current attribute.
1284 unsigned int totlen = NLA_ALIGN(nla->nla_len); in nla_next()
1286 *remaining -= totlen; in nla_next()
1291 * nla_find_nested - find attribute in a set of nested attributes
1292 * @nla: attribute containing the nested attributes
1293 * @attrtype: type of attribute to look for
1295 * Returns: the first attribute which matches the specified type.
1304 * nla_parse_nested - parse nested attributes
1306 * @maxtype: maximum attribute type to be expected
1307 * @nla: attribute containing the nested attributes
1318 if (!(nla->nla_type & NLA_F_NESTED)) { in nla_parse_nested()
1320 return -EINVAL; in nla_parse_nested()
1328 * nla_parse_nested_deprecated - parse nested attributes
1330 * @maxtype: maximum attribute type to be expected
1331 * @nla: attribute containing the nested attributes
1347 * nla_put_u8 - Add a u8 netlink attribute to a socket buffer
1348 * @skb: socket buffer to add attribute to
1349 * @attrtype: attribute type
1354 /* temporary variables to work around GCC PR81715 with asan-stack=1 */ in nla_put_u8()
1361 * nla_put_u16 - Add a u16 netlink attribute to a socket buffer
1362 * @skb: socket buffer to add attribute to
1363 * @attrtype: attribute type
1374 * nla_put_be16 - Add a __be16 netlink attribute to a socket buffer
1375 * @skb: socket buffer to add attribute to
1376 * @attrtype: attribute type
1387 * nla_put_net16 - Add 16-bit network byte order netlink attribute to a socket buffer
1388 * @skb: socket buffer to add attribute to
1389 * @attrtype: attribute type
1400 * nla_put_le16 - Add a __le16 netlink attribute to a socket buffer
1401 * @skb: socket buffer to add attribute to
1402 * @attrtype: attribute type
1413 * nla_put_u32 - Add a u32 netlink attribute to a socket buffer
1414 * @skb: socket buffer to add attribute to
1415 * @attrtype: attribute type
1426 * nla_put_uint - Add a variable-size unsigned int to a socket buffer
1427 * @skb: socket buffer to add attribute to
1428 * @attrtype: attribute type
1442 * nla_put_be32 - Add a __be32 netlink attribute to a socket buffer
1443 * @skb: socket buffer to add attribute to
1444 * @attrtype: attribute type
1455 * nla_put_net32 - Add 32-bit network byte order netlink attribute to a socket buffer
1456 * @skb: socket buffer to add attribute to
1457 * @attrtype: attribute type
1468 * nla_put_le32 - Add a __le32 netlink attribute to a socket buffer
1469 * @skb: socket buffer to add attribute to
1470 * @attrtype: attribute type
1481 * nla_put_u64_64bit - Add a u64 netlink attribute to a skb and align it
1482 * @skb: socket buffer to add attribute to
1483 * @attrtype: attribute type
1485 * @padattr: attribute type for the padding
1496 * nla_put_be64 - Add a __be64 netlink attribute to a socket buffer and align it
1497 * @skb: socket buffer to add attribute to
1498 * @attrtype: attribute type
1500 * @padattr: attribute type for the padding
1511 * nla_put_net64 - Add 64-bit network byte order nlattr to a skb and align it
1512 * @skb: socket buffer to add attribute to
1513 * @attrtype: attribute type
1515 * @padattr: attribute type for the padding
1527 * nla_put_le64 - Add a __le64 netlink attribute to a socket buffer and align it
1528 * @skb: socket buffer to add attribute to
1529 * @attrtype: attribute type
1531 * @padattr: attribute type for the padding
1542 * nla_put_s8 - Add a s8 netlink attribute to a socket buffer
1543 * @skb: socket buffer to add attribute to
1544 * @attrtype: attribute type
1555 * nla_put_s16 - Add a s16 netlink attribute to a socket buffer
1556 * @skb: socket buffer to add attribute to
1557 * @attrtype: attribute type
1568 * nla_put_s32 - Add a s32 netlink attribute to a socket buffer
1569 * @skb: socket buffer to add attribute to
1570 * @attrtype: attribute type
1581 * nla_put_s64 - Add a s64 netlink attribute to a socket buffer and align it
1582 * @skb: socket buffer to add attribute to
1583 * @attrtype: attribute type
1585 * @padattr: attribute type for the padding
1596 * nla_put_sint - Add a variable-size signed int to a socket buffer
1597 * @skb: socket buffer to add attribute to
1598 * @attrtype: attribute type
1612 * nla_put_string - Add a string netlink attribute to a socket buffer
1613 * @skb: socket buffer to add attribute to
1614 * @attrtype: attribute type
1624 * nla_put_flag - Add a flag netlink attribute to a socket buffer
1625 * @skb: socket buffer to add attribute to
1626 * @attrtype: attribute type
1634 * nla_put_msecs - Add a msecs netlink attribute to a skb and align it
1635 * @skb: socket buffer to add attribute to
1636 * @attrtype: attribute type
1638 * @padattr: attribute type for the padding
1649 * nla_put_in_addr - Add an IPv4 address netlink attribute to a socket
1651 * @skb: socket buffer to add attribute to
1652 * @attrtype: attribute type
1664 * nla_put_in6_addr - Add an IPv6 address netlink attribute to a socket
1666 * @skb: socket buffer to add attribute to
1667 * @attrtype: attribute type
1677 * nla_put_bitfield32 - Add a bitfield32 netlink attribute to a socket buffer
1678 * @skb: socket buffer to add attribute to
1679 * @attrtype: attribute type
1692 * nla_get_u32 - return payload of u32 attribute
1693 * @nla: u32 netlink attribute
1701 * nla_get_u32_default - return payload of u32 attribute or default
1702 * @nla: u32 netlink attribute, may be %NULL
1705 * Return: the value of the attribute, or the default value if not present
1715 * nla_get_be32 - return payload of __be32 attribute
1716 * @nla: __be32 netlink attribute
1724 * nla_get_be32_default - return payload of be32 attribute or default
1725 * @nla: __be32 netlink attribute, may be %NULL
1728 * Return: the value of the attribute, or the default value if not present
1739 * nla_get_le32 - return payload of __le32 attribute
1740 * @nla: __le32 netlink attribute
1748 * nla_get_le32_default - return payload of le32 attribute or default
1749 * @nla: __le32 netlink attribute, may be %NULL
1752 * Return: the value of the attribute, or the default value if not present
1763 * nla_get_u16 - return payload of u16 attribute
1764 * @nla: u16 netlink attribute
1772 * nla_get_u16_default - return payload of u16 attribute or default
1773 * @nla: u16 netlink attribute, may be %NULL
1776 * Return: the value of the attribute, or the default value if not present
1786 * nla_get_be16 - return payload of __be16 attribute
1787 * @nla: __be16 netlink attribute
1795 * nla_get_be16_default - return payload of be16 attribute or default
1796 * @nla: __be16 netlink attribute, may be %NULL
1799 * Return: the value of the attribute, or the default value if not present
1810 * nla_get_le16 - return payload of __le16 attribute
1811 * @nla: __le16 netlink attribute
1819 * nla_get_le16_default - return payload of le16 attribute or default
1820 * @nla: __le16 netlink attribute, may be %NULL
1823 * Return: the value of the attribute, or the default value if not present
1834 * nla_get_u8 - return payload of u8 attribute
1835 * @nla: u8 netlink attribute
1843 * nla_get_u8_default - return payload of u8 attribute or default
1844 * @nla: u8 netlink attribute, may be %NULL
1847 * Return: the value of the attribute, or the default value if not present
1857 * nla_get_u64 - return payload of u64 attribute
1858 * @nla: u64 netlink attribute
1870 * nla_get_u64_default - return payload of u64 attribute or default
1871 * @nla: u64 netlink attribute, may be %NULL
1874 * Return: the value of the attribute, or the default value if not present
1884 * nla_get_uint - return payload of uint attribute
1885 * @nla: uint netlink attribute
1895 * nla_get_uint_default - return payload of uint attribute or default
1896 * @nla: uint netlink attribute, may be %NULL
1899 * Return: the value of the attribute, or the default value if not present
1909 * nla_get_be64 - return payload of __be64 attribute
1910 * @nla: __be64 netlink attribute
1922 * nla_get_be64_default - return payload of be64 attribute or default
1923 * @nla: __be64 netlink attribute, may be %NULL
1926 * Return: the value of the attribute, or the default value if not present
1937 * nla_get_le64 - return payload of __le64 attribute
1938 * @nla: __le64 netlink attribute
1946 * nla_get_le64_default - return payload of le64 attribute or default
1947 * @nla: __le64 netlink attribute, may be %NULL
1950 * Return: the value of the attribute, or the default value if not present
1961 * nla_get_s32 - return payload of s32 attribute
1962 * @nla: s32 netlink attribute
1970 * nla_get_s32_default - return payload of s32 attribute or default
1971 * @nla: s32 netlink attribute, may be %NULL
1974 * Return: the value of the attribute, or the default value if not present
1984 * nla_get_s16 - return payload of s16 attribute
1985 * @nla: s16 netlink attribute
1993 * nla_get_s16_default - return payload of s16 attribute or default
1994 * @nla: s16 netlink attribute, may be %NULL
1997 * Return: the value of the attribute, or the default value if not present
2007 * nla_get_s8 - return payload of s8 attribute
2008 * @nla: s8 netlink attribute
2016 * nla_get_s8_default - return payload of s8 attribute or default
2017 * @nla: s8 netlink attribute, may be %NULL
2020 * Return: the value of the attribute, or the default value if not present
2030 * nla_get_s64 - return payload of s64 attribute
2031 * @nla: s64 netlink attribute
2043 * nla_get_s64_default - return payload of s64 attribute or default
2044 * @nla: s64 netlink attribute, may be %NULL
2047 * Return: the value of the attribute, or the default value if not present
2057 * nla_get_sint - return payload of uint attribute
2058 * @nla: uint netlink attribute
2068 * nla_get_sint_default - return payload of sint attribute or default
2069 * @nla: sint netlink attribute, may be %NULL
2072 * Return: the value of the attribute, or the default value if not present
2082 * nla_get_flag - return payload of flag attribute
2083 * @nla: flag netlink attribute
2091 * nla_get_msecs - return payload of msecs attribute
2092 * @nla: msecs netlink attribute
2104 * nla_get_msecs_default - return payload of msecs attribute or default
2105 * @nla: msecs netlink attribute, may be %NULL
2108 * Return: the value of the attribute, or the default value if not present
2119 * nla_get_in_addr - return payload of IPv4 address attribute
2120 * @nla: IPv4 address netlink attribute
2128 * nla_get_in_addr_default - return payload of be32 attribute or default
2129 * @nla: IPv4 address netlink attribute, may be %NULL
2132 * Return: the value of the attribute, or the default value if not present
2143 * nla_get_in6_addr - return payload of IPv6 address attribute
2144 * @nla: IPv6 address netlink attribute
2155 * nla_get_bitfield32 - return payload of 32 bitfield attribute
2156 * @nla: nla_bitfield32 attribute
2167 * nla_memdup - duplicate attribute memory (kmemdup)
2168 * @src: netlink attribute to duplicate from
2178 * nla_nest_start_noflag - Start a new level of nested attributes
2180 * @attrtype: attribute type of container
2186 * Returns: the container attribute or NULL on error
2200 * nla_nest_start - Start a new level of nested attributes, with NLA_F_NESTED
2202 * @attrtype: attribute type of container
2204 * Unlike nla_nest_start_noflag(), mark the nest attribute with NLA_F_NESTED
2207 * Returns: the container attribute or NULL on error
2215 * nla_nest_end - Finalize nesting of attributes
2217 * @start: container attribute
2219 * Corrects the container attribute header to include the all
2226 start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start; in nla_nest_end()
2227 return skb->len; in nla_nest_end()
2231 * nla_nest_cancel - Cancel nesting of attributes
2233 * @start: container attribute
2235 * Removes the container attribute and including all nested
2236 * attributes. Returns -EMSGSIZE
2244 * __nla_validate_nested - Validate a stream of nested attributes
2245 * @start: container attribute
2246 * @maxtype: maximum attribute type to be expected
2251 * Validates all attributes in the nested attribute stream against the
2285 * nla_need_padding_for_64bit - test 64-bit alignment of the next attribute
2288 * Return: true if padding is needed to align the next attribute (nla_data()) to
2289 * a 64-bit aligned area.
2295 * if the skb->data _is_ aligned. A NOP attribute, plus in nla_need_padding_for_64bit()
2296 * nlattr header for next attribute, will make nla_data() in nla_need_padding_for_64bit()
2297 * 8-byte aligned. in nla_need_padding_for_64bit()
2306 * nla_align_64bit - 64-bit align the nla_data() of next attribute
2308 * @padattr: attribute type for the padding
2310 * Conditionally emit a padding netlink attribute in order to make
2311 * the next attribute we emit have a 64-bit aligned nla_data() area.
2321 return -EMSGSIZE; in nla_align_64bit()
2327 * nla_total_size_64bit - total length of attribute including padding
2340 * nla_for_each_attr - iterate over a stream of attributes
2341 * @pos: loop counter, set to current attribute
2342 * @head: head of attribute stream
2343 * @len: length of attribute stream
2352 * nla_for_each_attr_type - iterate over a stream of attributes
2353 * @pos: loop counter, set to current attribute
2354 * @type: required attribute type for @pos
2355 * @head: head of attribute stream
2356 * @len: length of attribute stream
2364 * nla_for_each_nested - iterate over nested attributes
2365 * @pos: loop counter, set to current attribute
2366 * @nla: attribute containing the nested attributes
2373 * nla_for_each_nested_type - iterate over nested attributes
2374 * @pos: loop counter, set to current attribute
2375 * @type: required attribute type for @pos
2376 * @nla: attribute containing the nested attributes
2384 * nla_is_last - Test if attribute is last in stream
2385 * @nla: attribute to test
2390 return nla->nla_len == rem; in nla_is_last()