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
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
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
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
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.
318 * integers) of the attribute is enforced.
323 * NLA_BINARY Validation function called for the attribute.
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
493 * enum netlink_validation - netlink message/attribute validation levels
497 * @NL_VALIDATE_TRAILING: Reject junk data encountered after attribute parsing.
504 * @NL_VALIDATE_STRICT_ATTRS: strict attribute policy parsing (e.g.
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
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
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
746 * @maxtype: maximum attribute type to be expected
774 * @maxtype: maximum attribute type to be expected
794 * @maxtype: maximum attribute type to be expected
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.
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
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
894 * @maxtype: maximum attribute type to be expected
937 * @pos: loop counter, set to current attribute
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
1236 * nla_type - attribute type
1237 * @nla: netlink attribute
1246 * @nla: netlink attribute
1255 * @nla: netlink attribute
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
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.
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.
1306 * @maxtype: maximum attribute type to be expected
1307 * @nla: attribute containing the 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
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
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
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
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
2180 * @attrtype: attribute type of container
2186 * Returns: the container attribute or NULL on error
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
2217 * @start: container attribute
2219 * Corrects the container attribute header to include the all
2233 * @start: container attribute
2235 * Removes the container attribute and including all nested
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
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()
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.
2327 * nla_total_size_64bit - total length of attribute including padding
2341 * @pos: loop counter, set to current attribute
2342 * @head: head of attribute stream
2343 * @len: length of attribute stream
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
2365 * @pos: loop counter, set to current attribute
2366 * @nla: attribute containing the 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