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
145 * Attribute Misc:
146 * nla_memcpy(dest, nla, count) copy attribute into memory
147 * nla_memcmp(nla, data, size) compare attribute with memory area
148 * nla_strscpy(dst, nla, size) copy attribute to a sized string
149 * nla_strcmp(nla, str) compare attribute with string
151 * Attribute Parsing:
153 * nla_next(nla, remaining) get next netlink attribute
156 * nla_find() find attribute in stream of attributes
157 * nla_find_nested() find attribute in nested attributes
170 * Standard attribute types to specify validation policy
220 * struct nla_policy - attribute validation policy
221 * @type: Type of attribute or NLA_UNSPEC
222 * @validation_type: type of attribute validation done in addition to
228 * accessible by attribute type up to the highest identifier to be expected.
234 * NLA_BINARY Maximum length of attribute payload
252 * All other Minimum length of attribute payload
255 * NLA_BITFIELD32 This is a 32-bit bitmap/bitselector attribute and
257 * NLA_REJECT This attribute is always rejected and `reject_message'
261 * also set `len' to the max attribute number. Use the
266 * must also set `len' to the max attribute number. Use
271 * level down and the attribute types directly in the
287 * the value of the integer attribute.
316 * integers) of the attribute is enforced.
321 * NLA_BINARY Validation function called for the attribute.
341 * @strict_start_type: first attribute to validate strictly
343 * This entry is special, and used for the attribute at index 0
346 * starts for any attribute types >= this value, also, strict
490 * enum netlink_validation - netlink message/attribute validation levels
494 * @NL_VALIDATE_TRAILING: Reject junk data encountered after attribute parsing.
501 * @NL_VALIDATE_STRICT_ATTRS: strict attribute policy parsing (e.g.
665 * @maxtype: maximum attribute type to be expected
666 * @head: head of attribute stream
667 * @len: length of attribute stream
671 * Parses a stream of attributes and stores a pointer to each attribute in
672 * the tb array accessible via the attribute type. Attributes with a type
690 * @maxtype: maximum attribute type to be expected
691 * @head: head of attribute stream
692 * @len: length of attribute stream
696 * Parses a stream of attributes and stores a pointer to each attribute in
697 * the tb array accessible via the attribute type. Attributes with a type
715 * @maxtype: maximum attribute type to be expected
716 * @head: head of attribute stream
717 * @len: length of attribute stream
721 * Parses a stream of attributes and stores a pointer to each attribute in
722 * the tb array accessible via the attribute type. Attributes with a type
743 * @maxtype: maximum attribute type to be expected
771 * @maxtype: maximum attribute type to be expected
791 * @maxtype: maximum attribute type to be expected
811 * @maxtype: maximum attribute type to be expected
828 * nlmsg_find_attr - find a specific attribute in a netlink message
831 * @attrtype: type of attribute to look for
833 * Returns the first attribute which matches the specified type.
844 * @head: head of attribute stream
845 * @len: length of attribute stream
846 * @maxtype: maximum attribute type to be expected
850 * Validates all attributes in the specified attribute stream against the
867 * @head: head of attribute stream
868 * @len: length of attribute stream
869 * @maxtype: maximum attribute type to be expected
873 * Validates all attributes in the specified attribute stream against the
891 * @maxtype: maximum attribute type to be expected
934 * @pos: loop counter, set to current attribute
1206 * nla_attr_size - length of attribute not including padding
1215 * nla_total_size - total length of attribute including padding
1224 * nla_padlen - length of padding at the tail of attribute
1233 * nla_type - attribute type
1234 * @nla: netlink attribute
1243 * @nla: netlink attribute
1252 * @nla: netlink attribute
1260 * nla_ok - check if the netlink attribute fits into the remaining bytes
1261 * @nla: netlink attribute
1262 * @remaining: number of bytes remaining in attribute stream
1272 * nla_next - next netlink attribute in attribute stream
1273 * @nla: netlink attribute
1274 * @remaining: number of bytes remaining in attribute stream
1276 * Returns the next netlink attribute in the attribute stream and
1277 * decrements remaining by the size of the current attribute.
1288 * nla_find_nested - find attribute in a set of nested attributes
1289 * @nla: attribute containing the nested attributes
1290 * @attrtype: type of attribute to look for
1292 * Returns the first attribute which matches the specified type.
1303 * @maxtype: maximum attribute type to be expected
1304 * @nla: attribute containing the nested attributes
1327 * @maxtype: maximum attribute type to be expected
1328 * @nla: attribute containing the nested attributes
1344 * nla_put_u8 - Add a u8 netlink attribute to a socket buffer
1345 * @skb: socket buffer to add attribute to
1346 * @attrtype: attribute type
1358 * nla_put_u16 - Add a u16 netlink attribute to a socket buffer
1359 * @skb: socket buffer to add attribute to
1360 * @attrtype: attribute type
1371 * nla_put_be16 - Add a __be16 netlink attribute to a socket buffer
1372 * @skb: socket buffer to add attribute to
1373 * @attrtype: attribute type
1384 * nla_put_net16 - Add 16-bit network byte order netlink attribute to a socket buffer
1385 * @skb: socket buffer to add attribute to
1386 * @attrtype: attribute type
1397 * nla_put_le16 - Add a __le16 netlink attribute to a socket buffer
1398 * @skb: socket buffer to add attribute to
1399 * @attrtype: attribute type
1410 * nla_put_u32 - Add a u32 netlink attribute to a socket buffer
1411 * @skb: socket buffer to add attribute to
1412 * @attrtype: attribute type
1424 * @skb: socket buffer to add attribute to
1425 * @attrtype: attribute type
1439 * nla_put_be32 - Add a __be32 netlink attribute to a socket buffer
1440 * @skb: socket buffer to add attribute to
1441 * @attrtype: attribute type
1452 * nla_put_net32 - Add 32-bit network byte order netlink attribute to a socket buffer
1453 * @skb: socket buffer to add attribute to
1454 * @attrtype: attribute type
1465 * nla_put_le32 - Add a __le32 netlink attribute to a socket buffer
1466 * @skb: socket buffer to add attribute to
1467 * @attrtype: attribute type
1478 * nla_put_u64_64bit - Add a u64 netlink attribute to a skb and align it
1479 * @skb: socket buffer to add attribute to
1480 * @attrtype: attribute type
1482 * @padattr: attribute type for the padding
1493 * nla_put_be64 - Add a __be64 netlink attribute to a socket buffer and align it
1494 * @skb: socket buffer to add attribute to
1495 * @attrtype: attribute type
1497 * @padattr: attribute type for the padding
1509 * @skb: socket buffer to add attribute to
1510 * @attrtype: attribute type
1512 * @padattr: attribute type for the padding
1524 * nla_put_le64 - Add a __le64 netlink attribute to a socket buffer and align it
1525 * @skb: socket buffer to add attribute to
1526 * @attrtype: attribute type
1528 * @padattr: attribute type for the padding
1539 * nla_put_s8 - Add a s8 netlink attribute to a socket buffer
1540 * @skb: socket buffer to add attribute to
1541 * @attrtype: attribute type
1552 * nla_put_s16 - Add a s16 netlink attribute to a socket buffer
1553 * @skb: socket buffer to add attribute to
1554 * @attrtype: attribute type
1565 * nla_put_s32 - Add a s32 netlink attribute to a socket buffer
1566 * @skb: socket buffer to add attribute to
1567 * @attrtype: attribute type
1578 * nla_put_s64 - Add a s64 netlink attribute to a socket buffer and align it
1579 * @skb: socket buffer to add attribute to
1580 * @attrtype: attribute type
1582 * @padattr: attribute type for the padding
1594 * @skb: socket buffer to add attribute to
1595 * @attrtype: attribute type
1609 * nla_put_string - Add a string netlink attribute to a socket buffer
1610 * @skb: socket buffer to add attribute to
1611 * @attrtype: attribute type
1621 * nla_put_flag - Add a flag netlink attribute to a socket buffer
1622 * @skb: socket buffer to add attribute to
1623 * @attrtype: attribute type
1631 * nla_put_msecs - Add a msecs netlink attribute to a skb and align it
1632 * @skb: socket buffer to add attribute to
1633 * @attrtype: attribute type
1635 * @padattr: attribute type for the padding
1646 * nla_put_in_addr - Add an IPv4 address netlink attribute to a socket
1648 * @skb: socket buffer to add attribute to
1649 * @attrtype: attribute type
1661 * nla_put_in6_addr - Add an IPv6 address netlink attribute to a socket
1663 * @skb: socket buffer to add attribute to
1664 * @attrtype: attribute type
1674 * nla_put_bitfield32 - Add a bitfield32 netlink attribute to a socket buffer
1675 * @skb: socket buffer to add attribute to
1676 * @attrtype: attribute type
1689 * nla_get_u32 - return payload of u32 attribute
1690 * @nla: u32 netlink attribute
1698 * nla_get_be32 - return payload of __be32 attribute
1699 * @nla: __be32 netlink attribute
1707 * nla_get_le32 - return payload of __le32 attribute
1708 * @nla: __le32 netlink attribute
1716 * nla_get_u16 - return payload of u16 attribute
1717 * @nla: u16 netlink attribute
1725 * nla_get_be16 - return payload of __be16 attribute
1726 * @nla: __be16 netlink attribute
1734 * nla_get_le16 - return payload of __le16 attribute
1735 * @nla: __le16 netlink attribute
1743 * nla_get_u8 - return payload of u8 attribute
1744 * @nla: u8 netlink attribute
1752 * nla_get_u64 - return payload of u64 attribute
1753 * @nla: u64 netlink attribute
1765 * nla_get_uint - return payload of uint attribute
1766 * @nla: uint netlink attribute
1776 * nla_get_be64 - return payload of __be64 attribute
1777 * @nla: __be64 netlink attribute
1789 * nla_get_le64 - return payload of __le64 attribute
1790 * @nla: __le64 netlink attribute
1798 * nla_get_s32 - return payload of s32 attribute
1799 * @nla: s32 netlink attribute
1807 * nla_get_s16 - return payload of s16 attribute
1808 * @nla: s16 netlink attribute
1816 * nla_get_s8 - return payload of s8 attribute
1817 * @nla: s8 netlink attribute
1825 * nla_get_s64 - return payload of s64 attribute
1826 * @nla: s64 netlink attribute
1838 * nla_get_sint - return payload of uint attribute
1839 * @nla: uint netlink attribute
1849 * nla_get_flag - return payload of flag attribute
1850 * @nla: flag netlink attribute
1858 * nla_get_msecs - return payload of msecs attribute
1859 * @nla: msecs netlink attribute
1871 * nla_get_in_addr - return payload of IPv4 address attribute
1872 * @nla: IPv4 address netlink attribute
1880 * nla_get_in6_addr - return payload of IPv6 address attribute
1881 * @nla: IPv6 address netlink attribute
1892 * nla_get_bitfield32 - return payload of 32 bitfield attribute
1893 * @nla: nla_bitfield32 attribute
1904 * nla_memdup - duplicate attribute memory (kmemdup)
1905 * @src: netlink attribute to duplicate from
1917 * @attrtype: attribute type of container
1923 * Returns the container attribute or NULL on error
1939 * @attrtype: attribute type of container
1941 * Unlike nla_nest_start_noflag(), mark the nest attribute with NLA_F_NESTED
1944 * Returns the container attribute or NULL on error
1954 * @start: container attribute
1956 * Corrects the container attribute header to include the all
1970 * @start: container attribute
1972 * Removes the container attribute and including all nested
1982 * @start: container attribute
1983 * @maxtype: maximum attribute type to be expected
1988 * Validates all attributes in the nested attribute stream against the
2022 * nla_need_padding_for_64bit - test 64-bit alignment of the next attribute
2025 * Return true if padding is needed to align the next attribute (nla_data()) to
2032 * if the skb->data _is_ aligned. A NOP attribute, plus in nla_need_padding_for_64bit()
2033 * nlattr header for next attribute, will make nla_data() in nla_need_padding_for_64bit()
2043 * nla_align_64bit - 64-bit align the nla_data() of next attribute
2045 * @padattr: attribute type for the padding
2047 * Conditionally emit a padding netlink attribute in order to make
2048 * the next attribute we emit have a 64-bit aligned nla_data() area.
2064 * nla_total_size_64bit - total length of attribute including padding
2078 * @pos: loop counter, set to current attribute
2079 * @head: head of attribute stream
2080 * @len: length of attribute stream
2090 * @pos: loop counter, set to current attribute
2091 * @type: required attribute type for @pos
2092 * @head: head of attribute stream
2093 * @len: length of attribute stream
2102 * @pos: loop counter, set to current attribute
2103 * @nla: attribute containing the nested attributes
2111 * @pos: loop counter, set to current attribute
2112 * @type: required attribute type for @pos
2113 * @nla: attribute containing the nested attributes
2121 * nla_is_last - Test if attribute is last in stream
2122 * @nla: attribute to test