nla_parse_deprecated_strict(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nla_parse_deprecated_strict(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this one's about nla_parse_deprecated_strict, and yes the name is a whole mouthful, but we're gonna get through it together 🫢


✨ NAME ✨

nla_parse_deprecated_strict β€” parse a stream of attributes into a tb buffer 🌸

like, it takes your lil stream of netlink attributes and tucks each one into a buffer so you can find it later. that's the whole vibe ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int nla_parse_deprecated_strict (struct nlattr **tb , int maxtype ,
const struct nlattr *head , int len , const struct nla_policy *policy ,
struct netlink_ext_ack *extack );

int, bestie. it returns an int. keep that in your notes πŸ“


πŸ’– ARGUMENTS πŸ’–

okay so here's the lineup, no cap, all six of them:

  • tb β€” the destination array, and it's gotta have maxtype+1 elements. size it right or it's giving chaos 😭
  • maxtype β€” the maximum attribute type you're expecting. anything above this? rejected, periodt πŸ’…
  • head β€” head of the attribute stream. like, the very start of it πŸŽ€
  • len β€” length of the attribute stream. how much stream we're streaming 🌊
  • policy β€” the validation policy. the rulebook, the vibe check enforcer πŸ‘‘
  • extack β€” extended ACK pointer. for when you need to say more than "nope" πŸ’Œ

🌈 DESCRIPTION 🌈

so what does it actually do? it parses a stream of attributes and stores a pointer to each attribute in the tb array β€” and you can grab each one via the attribute type πŸ”βœ¨

attributes with a type exceeding maxtype will be rejected, and trailing data gets rejected too. rude? maybe. correct? absolutely πŸ’…

but here's the tea β˜• β€” the policy is not completely strictly validated. it's only validated for new attributes. that's literally the whole plot twist of the "deprecated" in the name, iykyk πŸ™ˆ

ngl bestie, "deprecated" is right there in the function name β€” so don't act surprised later. it's in the name for a reason πŸ’€

⭐ RETURN ⭐

0 on success, or a negative error code 😭

that's it. zero is the slay outcome, negative means something went sideways.


🧚 SEE ALSO 🧚

okay this list is long long, but every single one of these is invited to the party and we're not leaving anyone out πŸŽ€ all of them live in the kernel file ./include/net/netlink.h:

struct nla_policy(9), struct nl_info(9), enum netlink_validation(9), nlmsg_msg_size(9), nlmsg_total_size(9), nlmsg_padlen(9), nlmsg_data(9), nlmsg_len(9), nlmsg_payload(9), nlmsg_attrdata(9), nlmsg_attrlen(9), nlmsg_ok(9), nlmsg_next(9), nla_parse(9), nla_parse_deprecated(9), __nlmsg_parse(9), nlmsg_parse(9), nlmsg_parse_deprecated(9), nlmsg_parse_deprecated_strict(9), nlmsg_find_attr(9), nla_validate_deprecated(9), nla_validate(9), nlmsg_validate_deprecated(9), nlmsg_report(9), nlmsg_seq(9), nlmsg_for_each_attr(9), nlmsg_for_each_attr_type(9), nlmsg_put(9), nlmsg_append(9), nlmsg_put_answer(9), nlmsg_new(9), nlmsg_new_large(9), nlmsg_end(9), nlmsg_get_pos(9), nlmsg_trim(9), nlmsg_cancel(9), nlmsg_free(9), nlmsg_consume(9), nlmsg_multicast_filtered(9), nlmsg_multicast(9), nlmsg_unicast(9), nlmsg_for_each_msg(9), nl_dump_check_consistent(9), nla_attr_size(9), nla_total_size(9), nla_padlen(9), nla_type(9), nla_data(9), nla_len(9), nla_ok(9), nla_next(9), nla_find_nested(9), nla_parse_nested(9), nla_parse_nested_deprecated(9), nla_put_u8(9), nla_put_u16(9), nla_put_be16(9), nla_put_net16(9), nla_put_le16(9), nla_put_u32(9), nla_put_uint(9), nla_put_be32(9), nla_put_net32(9), nla_put_le32(9), nla_put_u64_64bit(9), nla_put_be64(9), nla_put_net64(9), nla_put_le64(9), nla_put_s8(9), nla_put_s16(9), nla_put_s32(9), nla_put_s64(9), nla_put_sint(9), nla_put_string(9), nla_put_flag(9), nla_put_msecs(9), nla_put_in_addr(9), nla_put_in6_addr(9), nla_put_bitfield32(9), nla_get_u32(9), nla_get_u32_default(9), nla_get_be32(9), nla_get_be32_default(9), nla_get_le32(9), nla_get_le32_default(9), nla_get_u16(9), nla_get_u16_default(9), nla_get_be16(9), nla_get_be16_default(9), nla_get_le16(9), nla_get_le16_default(9), nla_get_u8(9), nla_get_u8_default(9), nla_get_u64(9), nla_get_u64_default(9), nla_get_uint(9), nla_get_uint_default(9), nla_get_be64(9), nla_get_be64_default(9), nla_get_le64(9), nla_get_le64_default(9), nla_get_s32(9), nla_get_s32_default(9), nla_get_s16(9), nla_get_s16_default(9), nla_get_s8(9), nla_get_s8_default(9), nla_get_s64(9), nla_get_s64_default(9), nla_get_sint(9), nla_get_sint_default(9), nla_get_flag(9), nla_get_msecs(9), nla_get_msecs_default(9), nla_get_in_addr(9), nla_get_in_addr_default(9), nla_get_in6_addr(9), nla_get_bitfield32(9), nla_memdup(9), nla_nest_start_noflag(9), nla_nest_start(9), nla_nest_end(9), nla_nest_end_safe(9), nla_nest_cancel(9), nla_put_empty_nest(9), __nla_validate_nested(9), nla_need_padding_for_64bit(9), nla_align_64bit(9), nla_total_size_64bit(9), nla_for_each_attr(9), nla_for_each_attr_type(9), nla_for_each_nested(9), nla_for_each_nested_type(9), nla_is_last(9)


and that's the whole page, bestie πŸ₯³ go forth and parse responsibly πŸ’œ

~ sign-off szn ~ this lil beauty lives over in ./include/net and it's dated October 2026 🌸 mwah, catch you in the next manpage πŸ«ΆπŸ’…

πŸ“¦ where this page comes from