Lines Matching full:attribute

67  *   nlmsg_find_attr()			find an attribute in a message
79 * Attribute Format:
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
123 * Attribute Length Calculations:
124 * nla_attr_size(payload) length of attribute w/o padding
125 * nla_total_size(payload) length of attribute w/ padding
128 * Attribute Payload Access:
129 * nla_data(nla) head of attribute payload
130 * nla_len(nla) length of attribute payload
132 * Attribute Payload Access for Basic Types:
133 * nla_get_uint(nla) get payload for a uint attribute
134 * nla_get_sint(nla) get payload for a sint attribute
135 * nla_get_u8(nla) get payload for a u8 attribute
136 * nla_get_u16(nla) get payload for a u16 attribute
137 * nla_get_u32(nla) get payload for a u32 attribute
138 * nla_get_u64(nla) get payload for a u64 attribute
139 * nla_get_s8(nla) get payload for a s8 attribute
140 * nla_get_s16(nla) get payload for a s16 attribute
141 * nla_get_s32(nla) get payload for a s32 attribute
142 * nla_get_s64(nla) get payload for a s64 attribute
144 * nla_get_msecs(nla) get payload for a msecs attribute
148 * Attribute Misc:
149 * nla_memcpy(dest, nla, count) copy attribute into memory
150 * nla_memcmp(nla, data, size) compare attribute with memory area
151 * nla_strscpy(dst, nla, size) copy attribute to a sized string
152 * nla_strcmp(nla, str) compare attribute with string
154 * Attribute Parsing:
156 * nla_next(nla, remaining) get next netlink attribute
159 * nla_find() find attribute in stream of attributes
160 * nla_find_nested() find attribute in nested attributes
173 * Standard attribute types to specify validation policy
223 * struct nla_policy - attribute validation policy
224 * @type: Type of attribute or NLA_UNSPEC
225 * @validation_type: type of attribute validation done in addition to
231 * accessible by attribute type up to the highest identifier to be expected.
237 * NLA_BINARY Maximum length of attribute payload
255 * All other Minimum length of attribute payload
258 * NLA_BITFIELD32 This is a 32-bit bitmap/bitselector attribute and
260 * NLA_REJECT This attribute is always rejected and `reject_message'
264 * also set `len' to the max attribute number. Use the
269 * must also set `len' to the max attribute number. Use
274 * level down and the attribute types directly in the
290 * the value of the integer attribute.
319 * integers) of the attribute is enforced.
324 * NLA_BINARY Validation function called for the attribute.
344 * @strict_start_type: first attribute to validate strictly
346 * This entry is special, and used for the attribute at index 0
349 * starts for any attribute types >= this value, also, strict
494 * enum netlink_validation - netlink message/attribute validation levels
498 * @NL_VALIDATE_TRAILING: Reject junk data encountered after attribute parsing.
505 * @NL_VALIDATE_STRICT_ATTRS: strict attribute policy parsing (e.g.
669 * @maxtype: maximum attribute type to be expected
670 * @head: head of attribute stream
671 * @len: length of attribute stream
675 * Parses a stream of attributes and stores a pointer to each attribute in
676 * the tb array accessible via the attribute type. Attributes with a type
694 * @maxtype: maximum attribute type to be expected
695 * @head: head of attribute stream
696 * @len: length of attribute stream
700 * Parses a stream of attributes and stores a pointer to each attribute in
701 * the tb array accessible via the attribute type. Attributes with a type
719 * @maxtype: maximum attribute type to be expected
720 * @head: head of attribute stream
721 * @len: length of attribute stream
725 * Parses a stream of attributes and stores a pointer to each attribute in
726 * the tb array accessible via the attribute type. Attributes with a type
747 * @maxtype: maximum attribute type to be expected
775 * @maxtype: maximum attribute type to be expected
795 * @maxtype: maximum attribute type to be expected
815 * @maxtype: maximum attribute type to be expected
832 * nlmsg_find_attr - find a specific attribute in a netlink message
835 * @attrtype: type of attribute to look for
837 * Returns: the first attribute which matches the specified type.
848 * @head: head of attribute stream
849 * @len: length of attribute stream
850 * @maxtype: maximum attribute type to be expected
854 * Validates all attributes in the specified attribute stream against the
871 * @head: head of attribute stream
872 * @len: length of attribute stream
873 * @maxtype: maximum attribute type to be expected
877 * Validates all attributes in the specified attribute stream against the
895 * @maxtype: maximum attribute type to be expected
938 * @pos: loop counter, set to current attribute
1210 * nla_attr_size - length of attribute not including padding
1219 * nla_total_size - total length of attribute including padding
1228 * nla_padlen - length of padding at the tail of attribute
1237 * nla_type - attribute type
1238 * @nla: netlink attribute
1247 * @nla: netlink attribute
1256 * @nla: netlink attribute
1264 * nla_ok - check if the netlink attribute fits into the remaining bytes
1265 * @nla: netlink attribute
1266 * @remaining: number of bytes remaining in attribute stream
1276 * nla_next - next netlink attribute in attribute stream
1277 * @nla: netlink attribute
1278 * @remaining: number of bytes remaining in attribute stream
1280 * Returns: the next netlink attribute in the attribute stream and
1281 * decrements remaining by the size of the current attribute.
1292 * nla_find_nested - find attribute in a set of nested attributes
1293 * @nla: attribute containing the nested attributes
1294 * @attrtype: type of attribute to look for
1296 * Returns: the first attribute which matches the specified type.
1307 * @maxtype: maximum attribute type to be expected
1308 * @nla: attribute containing the nested attributes
1331 * @maxtype: maximum attribute type to be expected
1332 * @nla: attribute containing the nested attributes
1348 * nla_put_u8 - Add a u8 netlink attribute to a socket buffer
1349 * @skb: socket buffer to add attribute to
1350 * @attrtype: attribute type
1362 * nla_put_u16 - Add a u16 netlink attribute to a socket buffer
1363 * @skb: socket buffer to add attribute to
1364 * @attrtype: attribute type
1375 * nla_put_be16 - Add a __be16 netlink attribute to a socket buffer
1376 * @skb: socket buffer to add attribute to
1377 * @attrtype: attribute type
1388 * nla_put_net16 - Add 16-bit network byte order netlink attribute to a socket buffer
1389 * @skb: socket buffer to add attribute to
1390 * @attrtype: attribute type
1401 * nla_put_le16 - Add a __le16 netlink attribute to a socket buffer
1402 * @skb: socket buffer to add attribute to
1403 * @attrtype: attribute type
1414 * nla_put_u32 - Add a u32 netlink attribute to a socket buffer
1415 * @skb: socket buffer to add attribute to
1416 * @attrtype: attribute type
1428 * @skb: socket buffer to add attribute to
1429 * @attrtype: attribute type
1443 * nla_put_be32 - Add a __be32 netlink attribute to a socket buffer
1444 * @skb: socket buffer to add attribute to
1445 * @attrtype: attribute type
1456 * nla_put_net32 - Add 32-bit network byte order netlink attribute to a socket buffer
1457 * @skb: socket buffer to add attribute to
1458 * @attrtype: attribute type
1469 * nla_put_le32 - Add a __le32 netlink attribute to a socket buffer
1470 * @skb: socket buffer to add attribute to
1471 * @attrtype: attribute type
1482 * nla_put_u64_64bit - Add a u64 netlink attribute to a skb and align it
1483 * @skb: socket buffer to add attribute to
1484 * @attrtype: attribute type
1486 * @padattr: attribute type for the padding
1497 * nla_put_be64 - Add a __be64 netlink attribute to a socket buffer and align it
1498 * @skb: socket buffer to add attribute to
1499 * @attrtype: attribute type
1501 * @padattr: attribute type for the padding
1513 * @skb: socket buffer to add attribute to
1514 * @attrtype: attribute type
1516 * @padattr: attribute type for the padding
1528 * nla_put_le64 - Add a __le64 netlink attribute to a socket buffer and align it
1529 * @skb: socket buffer to add attribute to
1530 * @attrtype: attribute type
1532 * @padattr: attribute type for the padding
1543 * nla_put_s8 - Add a s8 netlink attribute to a socket buffer
1544 * @skb: socket buffer to add attribute to
1545 * @attrtype: attribute type
1556 * nla_put_s16 - Add a s16 netlink attribute to a socket buffer
1557 * @skb: socket buffer to add attribute to
1558 * @attrtype: attribute type
1569 * nla_put_s32 - Add a s32 netlink attribute to a socket buffer
1570 * @skb: socket buffer to add attribute to
1571 * @attrtype: attribute type
1582 * nla_put_s64 - Add a s64 netlink attribute to a socket buffer and align it
1583 * @skb: socket buffer to add attribute to
1584 * @attrtype: attribute type
1586 * @padattr: attribute type for the padding
1598 * @skb: socket buffer to add attribute to
1599 * @attrtype: attribute type
1613 * nla_put_string - Add a string netlink attribute to a socket buffer
1614 * @skb: socket buffer to add attribute to
1615 * @attrtype: attribute type
1625 * nla_put_flag - Add a flag netlink attribute to a socket buffer
1626 * @skb: socket buffer to add attribute to
1627 * @attrtype: attribute type
1635 * nla_put_msecs - Add a msecs netlink attribute to a skb and align it
1636 * @skb: socket buffer to add attribute to
1637 * @attrtype: attribute type
1639 * @padattr: attribute type for the padding
1650 * nla_put_in_addr - Add an IPv4 address netlink attribute to a socket
1652 * @skb: socket buffer to add attribute to
1653 * @attrtype: attribute type
1665 * nla_put_in6_addr - Add an IPv6 address netlink attribute to a socket
1667 * @skb: socket buffer to add attribute to
1668 * @attrtype: attribute type
1678 * nla_put_bitfield32 - Add a bitfield32 netlink attribute to a socket buffer
1679 * @skb: socket buffer to add attribute to
1680 * @attrtype: attribute type
1693 * nla_get_u32 - return payload of u32 attribute
1694 * @nla: u32 netlink attribute
1702 * nla_get_u32_default - return payload of u32 attribute or default
1703 * @nla: u32 netlink attribute, may be %NULL
1706 * Return: the value of the attribute, or the default value if not present
1716 * nla_get_be32 - return payload of __be32 attribute
1717 * @nla: __be32 netlink attribute
1725 * nla_get_be32_default - return payload of be32 attribute or default
1726 * @nla: __be32 netlink attribute, may be %NULL
1729 * Return: the value of the attribute, or the default value if not present
1740 * nla_get_le32 - return payload of __le32 attribute
1741 * @nla: __le32 netlink attribute
1749 * nla_get_le32_default - return payload of le32 attribute or default
1750 * @nla: __le32 netlink attribute, may be %NULL
1753 * Return: the value of the attribute, or the default value if not present
1764 * nla_get_u16 - return payload of u16 attribute
1765 * @nla: u16 netlink attribute
1773 * nla_get_u16_default - return payload of u16 attribute or default
1774 * @nla: u16 netlink attribute, may be %NULL
1777 * Return: the value of the attribute, or the default value if not present
1787 * nla_get_be16 - return payload of __be16 attribute
1788 * @nla: __be16 netlink attribute
1796 * nla_get_be16_default - return payload of be16 attribute or default
1797 * @nla: __be16 netlink attribute, may be %NULL
1800 * Return: the value of the attribute, or the default value if not present
1811 * nla_get_le16 - return payload of __le16 attribute
1812 * @nla: __le16 netlink attribute
1820 * nla_get_le16_default - return payload of le16 attribute or default
1821 * @nla: __le16 netlink attribute, may be %NULL
1824 * Return: the value of the attribute, or the default value if not present
1835 * nla_get_u8 - return payload of u8 attribute
1836 * @nla: u8 netlink attribute
1844 * nla_get_u8_default - return payload of u8 attribute or default
1845 * @nla: u8 netlink attribute, may be %NULL
1848 * Return: the value of the attribute, or the default value if not present
1858 * nla_get_u64 - return payload of u64 attribute
1859 * @nla: u64 netlink attribute
1871 * nla_get_u64_default - return payload of u64 attribute or default
1872 * @nla: u64 netlink attribute, may be %NULL
1875 * Return: the value of the attribute, or the default value if not present
1885 * nla_get_uint - return payload of uint attribute
1886 * @nla: uint netlink attribute
1896 * nla_get_uint_default - return payload of uint attribute or default
1897 * @nla: uint netlink attribute, may be %NULL
1900 * Return: the value of the attribute, or the default value if not present
1910 * nla_get_be64 - return payload of __be64 attribute
1911 * @nla: __be64 netlink attribute
1923 * nla_get_be64_default - return payload of be64 attribute or default
1924 * @nla: __be64 netlink attribute, may be %NULL
1927 * Return: the value of the attribute, or the default value if not present
1938 * nla_get_le64 - return payload of __le64 attribute
1939 * @nla: __le64 netlink attribute
1947 * nla_get_le64_default - return payload of le64 attribute or default
1948 * @nla: __le64 netlink attribute, may be %NULL
1951 * Return: the value of the attribute, or the default value if not present
1962 * nla_get_s32 - return payload of s32 attribute
1963 * @nla: s32 netlink attribute
1971 * nla_get_s32_default - return payload of s32 attribute or default
1972 * @nla: s32 netlink attribute, may be %NULL
1975 * Return: the value of the attribute, or the default value if not present
1985 * nla_get_s16 - return payload of s16 attribute
1986 * @nla: s16 netlink attribute
1994 * nla_get_s16_default - return payload of s16 attribute or default
1995 * @nla: s16 netlink attribute, may be %NULL
1998 * Return: the value of the attribute, or the default value if not present
2008 * nla_get_s8 - return payload of s8 attribute
2009 * @nla: s8 netlink attribute
2017 * nla_get_s8_default - return payload of s8 attribute or default
2018 * @nla: s8 netlink attribute, may be %NULL
2021 * Return: the value of the attribute, or the default value if not present
2031 * nla_get_s64 - return payload of s64 attribute
2032 * @nla: s64 netlink attribute
2044 * nla_get_s64_default - return payload of s64 attribute or default
2045 * @nla: s64 netlink attribute, may be %NULL
2048 * Return: the value of the attribute, or the default value if not present
2058 * nla_get_sint - return payload of uint attribute
2059 * @nla: uint netlink attribute
2069 * nla_get_sint_default - return payload of sint attribute or default
2070 * @nla: sint netlink attribute, may be %NULL
2073 * Return: the value of the attribute, or the default value if not present
2083 * nla_get_flag - return payload of flag attribute
2084 * @nla: flag netlink attribute
2092 * nla_get_msecs - return payload of msecs attribute
2093 * @nla: msecs netlink attribute
2105 * nla_get_msecs_default - return payload of msecs attribute or default
2106 * @nla: msecs netlink attribute, may be %NULL
2109 * Return: the value of the attribute, or the default value if not present
2120 * nla_get_in_addr - return payload of IPv4 address attribute
2121 * @nla: IPv4 address netlink attribute
2129 * nla_get_in_addr_default - return payload of be32 attribute or default
2130 * @nla: IPv4 address netlink attribute, may be %NULL
2133 * Return: the value of the attribute, or the default value if not present
2144 * nla_get_in6_addr - return payload of IPv6 address attribute
2145 * @nla: IPv6 address netlink attribute
2156 * nla_get_bitfield32 - return payload of 32 bitfield attribute
2157 * @nla: nla_bitfield32 attribute
2168 * nla_memdup - duplicate attribute memory (kmemdup)
2169 * @src: netlink attribute to duplicate from
2181 * @attrtype: attribute type of container
2187 * Returns: the container attribute or NULL on error
2203 * @attrtype: attribute type of container
2205 * Unlike nla_nest_start_noflag(), mark the nest attribute with NLA_F_NESTED
2208 * Returns: the container attribute or NULL on error
2218 * @start: container attribute
2220 * Corrects the container attribute header to include the all
2234 * @start: container attribute
2236 * Removes the container attribute and including all nested
2247 * @attrtype: attribute type of the container
2260 * @start: container attribute
2261 * @maxtype: maximum attribute type to be expected
2266 * Validates all attributes in the nested attribute stream against the
2300 * nla_need_padding_for_64bit - test 64-bit alignment of the next attribute
2303 * Return: true if padding is needed to align the next attribute (nla_data()) to
2310 * if the skb->data _is_ aligned. A NOP attribute, plus in nla_need_padding_for_64bit()
2311 * nlattr header for next attribute, will make nla_data() in nla_need_padding_for_64bit()
2321 * nla_align_64bit - 64-bit align the nla_data() of next attribute
2323 * @padattr: attribute type for the padding
2325 * Conditionally emit a padding netlink attribute in order to make
2326 * the next attribute we emit have a 64-bit aligned nla_data() area.
2342 * nla_total_size_64bit - total length of attribute including padding
2356 * @pos: loop counter, set to current attribute
2357 * @head: head of attribute stream
2358 * @len: length of attribute stream
2368 * @pos: loop counter, set to current attribute
2369 * @type: required attribute type for @pos
2370 * @head: head of attribute stream
2371 * @len: length of attribute stream
2380 * @pos: loop counter, set to current attribute
2381 * @nla: attribute containing the nested attributes
2389 * @pos: loop counter, set to current attribute
2390 * @type: required attribute type for @pos
2391 * @nla: attribute containing the nested attributes
2399 * nla_is_last - Test if attribute is last in stream
2400 * @nla: attribute to test