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.
329 * NLA_BINARY Validation function called for the attribute.
350 * @strict_start_type: first attribute to validate strictly
352 * This entry is special, and used for the attribute at index 0
355 * starts for any attribute types >= this value, also, strict
500 * enum netlink_validation - netlink message/attribute validation levels
504 * @NL_VALIDATE_TRAILING: Reject junk data encountered after attribute parsing.
511 * @NL_VALIDATE_STRICT_ATTRS: strict attribute policy parsing (e.g.
691 * @maxtype: maximum attribute type to be expected
692 * @head: head of attribute stream
693 * @len: length of attribute stream
697 * Parses a stream of attributes and stores a pointer to each attribute in
698 * the tb array accessible via the attribute type. Attributes with a type
716 * @maxtype: maximum attribute type to be expected
717 * @head: head of attribute stream
718 * @len: length of attribute stream
722 * Parses a stream of attributes and stores a pointer to each attribute in
723 * the tb array accessible via the attribute type. Attributes with a type
741 * @maxtype: maximum attribute type to be expected
742 * @head: head of attribute stream
743 * @len: length of attribute stream
747 * Parses a stream of attributes and stores a pointer to each attribute in
748 * the tb array accessible via the attribute type. Attributes with a type
769 * @maxtype: maximum attribute type to be expected
797 * @maxtype: maximum attribute type to be expected
817 * @maxtype: maximum attribute type to be expected
837 * @maxtype: maximum attribute type to be expected
854 * nlmsg_find_attr - find a specific attribute in a netlink message
857 * @attrtype: type of attribute to look for
859 * Returns: the first attribute which matches the specified type.
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
893 * @head: head of attribute stream
894 * @len: length of attribute stream
895 * @maxtype: maximum attribute type to be expected
899 * Validates all attributes in the specified attribute stream against the
917 * @maxtype: maximum attribute type to be expected
960 * @pos: loop counter, set to current attribute
1232 * nla_attr_size - length of attribute not including padding
1241 * nla_total_size - total length of attribute including padding
1250 * nla_padlen - length of padding at the tail of attribute
1259 * nla_type - attribute type
1260 * @nla: netlink attribute
1269 * @nla: netlink attribute
1278 * @nla: netlink attribute
1286 * nla_ok - check if the netlink attribute fits into the remaining bytes
1287 * @nla: netlink attribute
1288 * @remaining: number of bytes remaining in attribute stream
1298 * nla_next - next netlink attribute in attribute stream
1299 * @nla: netlink attribute
1300 * @remaining: number of bytes remaining in attribute stream
1302 * Returns: the next netlink attribute in the attribute stream and
1303 * decrements remaining by the size of the current attribute.
1314 * nla_find_nested - find attribute in a set of nested attributes
1315 * @nla: attribute containing the nested attributes
1316 * @attrtype: type of attribute to look for
1318 * Returns: the first attribute which matches the specified type.
1329 * @maxtype: maximum attribute type to be expected
1330 * @nla: attribute containing the nested attributes
1353 * @maxtype: maximum attribute type to be expected
1354 * @nla: attribute containing the nested attributes
1370 * nla_put_u8 - Add a u8 netlink attribute to a socket buffer
1371 * @skb: socket buffer to add attribute to
1372 * @attrtype: attribute type
1384 * nla_put_u16 - Add a u16 netlink attribute to a socket buffer
1385 * @skb: socket buffer to add attribute to
1386 * @attrtype: attribute type
1397 * nla_put_be16 - Add a __be16 netlink attribute to a socket buffer
1398 * @skb: socket buffer to add attribute to
1399 * @attrtype: attribute type
1410 * nla_put_net16 - Add 16-bit network byte order netlink attribute to a socket buffer
1411 * @skb: socket buffer to add attribute to
1412 * @attrtype: attribute type
1423 * nla_put_le16 - Add a __le16 netlink attribute to a socket buffer
1424 * @skb: socket buffer to add attribute to
1425 * @attrtype: attribute type
1436 * nla_put_u32 - Add a u32 netlink attribute to a socket buffer
1437 * @skb: socket buffer to add attribute to
1438 * @attrtype: attribute type
1450 * @skb: socket buffer to add attribute to
1451 * @attrtype: attribute type
1465 * nla_put_be32 - Add a __be32 netlink attribute to a socket buffer
1466 * @skb: socket buffer to add attribute to
1467 * @attrtype: attribute type
1478 * nla_put_net32 - Add 32-bit network byte order netlink attribute to a socket buffer
1479 * @skb: socket buffer to add attribute to
1480 * @attrtype: attribute type
1491 * nla_put_le32 - Add a __le32 netlink attribute to a socket buffer
1492 * @skb: socket buffer to add attribute to
1493 * @attrtype: attribute type
1504 * nla_put_u64_64bit - Add a u64 netlink attribute to a skb and align it
1505 * @skb: socket buffer to add attribute to
1506 * @attrtype: attribute type
1508 * @padattr: attribute type for the padding
1519 * nla_put_be64 - Add a __be64 netlink attribute to a socket buffer and align it
1520 * @skb: socket buffer to add attribute to
1521 * @attrtype: attribute type
1523 * @padattr: attribute type for the padding
1535 * @skb: socket buffer to add attribute to
1536 * @attrtype: attribute type
1538 * @padattr: attribute type for the padding
1550 * nla_put_le64 - Add a __le64 netlink attribute to a socket buffer and align it
1551 * @skb: socket buffer to add attribute to
1552 * @attrtype: attribute type
1554 * @padattr: attribute type for the padding
1565 * nla_put_s8 - Add a s8 netlink attribute to a socket buffer
1566 * @skb: socket buffer to add attribute to
1567 * @attrtype: attribute type
1578 * nla_put_s16 - Add a s16 netlink attribute to a socket buffer
1579 * @skb: socket buffer to add attribute to
1580 * @attrtype: attribute type
1591 * nla_put_s32 - Add a s32 netlink attribute to a socket buffer
1592 * @skb: socket buffer to add attribute to
1593 * @attrtype: attribute type
1604 * nla_put_s64 - Add a s64 netlink attribute to a socket buffer and align it
1605 * @skb: socket buffer to add attribute to
1606 * @attrtype: attribute type
1608 * @padattr: attribute type for the padding
1620 * @skb: socket buffer to add attribute to
1621 * @attrtype: attribute type
1635 * nla_put_string - Add a string netlink attribute to a socket buffer
1636 * @skb: socket buffer to add attribute to
1637 * @attrtype: attribute type
1647 * nla_put_flag - Add a flag netlink attribute to a socket buffer
1648 * @skb: socket buffer to add attribute to
1649 * @attrtype: attribute type
1657 * nla_put_msecs - Add a msecs netlink attribute to a skb and align it
1658 * @skb: socket buffer to add attribute to
1659 * @attrtype: attribute type
1661 * @padattr: attribute type for the padding
1672 * nla_put_in_addr - Add an IPv4 address netlink attribute to a socket
1674 * @skb: socket buffer to add attribute to
1675 * @attrtype: attribute type
1687 * nla_put_in6_addr - Add an IPv6 address netlink attribute to a socket
1689 * @skb: socket buffer to add attribute to
1690 * @attrtype: attribute type
1700 * nla_put_bitfield32 - Add a bitfield32 netlink attribute to a socket buffer
1701 * @skb: socket buffer to add attribute to
1702 * @attrtype: attribute type
1715 * nla_get_u32 - return payload of u32 attribute
1716 * @nla: u32 netlink attribute
1724 * nla_get_u32_default - return payload of u32 attribute or default
1725 * @nla: u32 netlink attribute, may be %NULL
1728 * Return: the value of the attribute, or the default value if not present
1738 * nla_get_be32 - return payload of __be32 attribute
1739 * @nla: __be32 netlink attribute
1747 * nla_get_be32_default - return payload of be32 attribute or default
1748 * @nla: __be32 netlink attribute, may be %NULL
1751 * Return: the value of the attribute, or the default value if not present
1762 * nla_get_le32 - return payload of __le32 attribute
1763 * @nla: __le32 netlink attribute
1771 * nla_get_le32_default - return payload of le32 attribute or default
1772 * @nla: __le32 netlink attribute, may be %NULL
1775 * Return: the value of the attribute, or the default value if not present
1786 * nla_get_u16 - return payload of u16 attribute
1787 * @nla: u16 netlink attribute
1795 * nla_get_u16_default - return payload of u16 attribute or default
1796 * @nla: u16 netlink attribute, may be %NULL
1799 * Return: the value of the attribute, or the default value if not present
1809 * nla_get_be16 - return payload of __be16 attribute
1810 * @nla: __be16 netlink attribute
1818 * nla_get_be16_default - return payload of be16 attribute or default
1819 * @nla: __be16 netlink attribute, may be %NULL
1822 * Return: the value of the attribute, or the default value if not present
1833 * nla_get_le16 - return payload of __le16 attribute
1834 * @nla: __le16 netlink attribute
1842 * nla_get_le16_default - return payload of le16 attribute or default
1843 * @nla: __le16 netlink attribute, may be %NULL
1846 * Return: the value of the attribute, or the default value if not present
1857 * nla_get_u8 - return payload of u8 attribute
1858 * @nla: u8 netlink attribute
1866 * nla_get_u8_default - return payload of u8 attribute or default
1867 * @nla: u8 netlink attribute, may be %NULL
1870 * Return: the value of the attribute, or the default value if not present
1880 * nla_get_u64 - return payload of u64 attribute
1881 * @nla: u64 netlink attribute
1893 * nla_get_u64_default - return payload of u64 attribute or default
1894 * @nla: u64 netlink attribute, may be %NULL
1897 * Return: the value of the attribute, or the default value if not present
1907 * nla_get_uint - return payload of uint attribute
1908 * @nla: uint netlink attribute
1918 * nla_get_uint_default - return payload of uint attribute or default
1919 * @nla: uint netlink attribute, may be %NULL
1922 * Return: the value of the attribute, or the default value if not present
1932 * nla_get_be64 - return payload of __be64 attribute
1933 * @nla: __be64 netlink attribute
1945 * nla_get_be64_default - return payload of be64 attribute or default
1946 * @nla: __be64 netlink attribute, may be %NULL
1949 * Return: the value of the attribute, or the default value if not present
1960 * nla_get_le64 - return payload of __le64 attribute
1961 * @nla: __le64 netlink attribute
1969 * nla_get_le64_default - return payload of le64 attribute or default
1970 * @nla: __le64 netlink attribute, may be %NULL
1973 * Return: the value of the attribute, or the default value if not present
1984 * nla_get_s32 - return payload of s32 attribute
1985 * @nla: s32 netlink attribute
1993 * nla_get_s32_default - return payload of s32 attribute or default
1994 * @nla: s32 netlink attribute, may be %NULL
1997 * Return: the value of the attribute, or the default value if not present
2007 * nla_get_s16 - return payload of s16 attribute
2008 * @nla: s16 netlink attribute
2016 * nla_get_s16_default - return payload of s16 attribute or default
2017 * @nla: s16 netlink attribute, may be %NULL
2020 * Return: the value of the attribute, or the default value if not present
2030 * nla_get_s8 - return payload of s8 attribute
2031 * @nla: s8 netlink attribute
2039 * nla_get_s8_default - return payload of s8 attribute or default
2040 * @nla: s8 netlink attribute, may be %NULL
2043 * Return: the value of the attribute, or the default value if not present
2053 * nla_get_s64 - return payload of s64 attribute
2054 * @nla: s64 netlink attribute
2066 * nla_get_s64_default - return payload of s64 attribute or default
2067 * @nla: s64 netlink attribute, may be %NULL
2070 * Return: the value of the attribute, or the default value if not present
2080 * nla_get_sint - return payload of uint attribute
2081 * @nla: uint netlink attribute
2091 * nla_get_sint_default - return payload of sint attribute or default
2092 * @nla: sint netlink attribute, may be %NULL
2095 * Return: the value of the attribute, or the default value if not present
2105 * nla_get_flag - return payload of flag attribute
2106 * @nla: flag netlink attribute
2114 * nla_get_msecs - return payload of msecs attribute
2115 * @nla: msecs netlink attribute
2127 * nla_get_msecs_default - return payload of msecs attribute or default
2128 * @nla: msecs netlink attribute, may be %NULL
2131 * Return: the value of the attribute, or the default value if not present
2142 * nla_get_in_addr - return payload of IPv4 address attribute
2143 * @nla: IPv4 address netlink attribute
2151 * nla_get_in_addr_default - return payload of be32 attribute or default
2152 * @nla: IPv4 address netlink attribute, may be %NULL
2155 * Return: the value of the attribute, or the default value if not present
2166 * nla_get_in6_addr - return payload of IPv6 address attribute
2167 * @nla: IPv6 address netlink attribute
2178 * nla_get_bitfield32 - return payload of 32 bitfield attribute
2179 * @nla: nla_bitfield32 attribute
2190 * nla_memdup - duplicate attribute memory (kmemdup)
2191 * @src: netlink attribute to duplicate from
2203 * @attrtype: attribute type of container
2209 * Returns: the container attribute or NULL on error
2225 * @attrtype: attribute type of container
2227 * Unlike nla_nest_start_noflag(), mark the nest attribute with NLA_F_NESTED
2230 * Returns: the container attribute or NULL on error
2240 * @start: container attribute
2242 * Corrects the container attribute header to include the all
2256 * @start: container attribute
2258 * Removes the container attribute and including all nested
2269 * @attrtype: attribute type of the container
2282 * @start: container attribute
2283 * @maxtype: maximum attribute type to be expected
2288 * Validates all attributes in the nested attribute stream against the
2322 * nla_need_padding_for_64bit - test 64-bit alignment of the next attribute
2325 * Return: true if padding is needed to align the next attribute (nla_data()) to
2332 * if the skb->data _is_ aligned. A NOP attribute, plus
2333 * nlattr header for next attribute, will make nla_data()
2343 * nla_align_64bit - 64-bit align the nla_data() of next attribute
2345 * @padattr: attribute type for the padding
2347 * Conditionally emit a padding netlink attribute in order to make
2348 * the next attribute we emit have a 64-bit aligned nla_data() area.
2364 * nla_total_size_64bit - total length of attribute including padding
2378 * @pos: loop counter, set to current attribute
2379 * @head: head of attribute stream
2380 * @len: length of attribute stream
2390 * @pos: loop counter, set to current attribute
2391 * @type: required attribute type for @pos
2392 * @head: head of attribute stream
2393 * @len: length of attribute stream
2402 * @pos: loop counter, set to current attribute
2403 * @nla: attribute containing the nested attributes
2411 * @pos: loop counter, set to current attribute
2412 * @type: required attribute type for @pos
2413 * @nla: attribute containing the nested attributes
2421 * nla_is_last - Test if attribute is last in stream
2422 * @nla: attribute to test