ENUM NETLINK_POLICY_TYPE_ATTR(9)
π enum netlink_policy_type_attr β policy type attributes π
okay bestie, this is <hotpink>enum netlink_policy_type_attr</hotpink> from the Kernel API Manual (section 9, kernel API, iykyk) and it's basically the master list of policy type attributes β the lil named slots that tell netlink how to check the attributes you're passing it. so slay. let's go πΈ
β¨ SYNOPSIS β¨
enum netlink_policy_type_attr {
NL_POLICY_TYPE_ATTR_UNSPEC ,
NL_POLICY_TYPE_ATTR_TYPE ,
NL_POLICY_TYPE_ATTR_MIN_VALUE_S ,
NL_POLICY_TYPE_ATTR_MAX_VALUE_S ,
NL_POLICY_TYPE_ATTR_MIN_VALUE_U ,
NL_POLICY_TYPE_ATTR_MAX_VALUE_U ,
NL_POLICY_TYPE_ATTR_MIN_LENGTH ,
NL_POLICY_TYPE_ATTR_MAX_LENGTH ,
NL_POLICY_TYPE_ATTR_POLICY_IDX ,
NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE ,
NL_POLICY_TYPE_ATTR_BITFIELD32_MASK ,
NL_POLICY_TYPE_ATTR_PAD ,
NL_POLICY_TYPE_ATTR_MASK ,
__NL_POLICY_TYPE_ATTR_MAX ,
NL_POLICY_TYPE_ATTR_MAX
};
π Constants π
like, every single one of them, no skipping, no cap π«Ά
NL_POLICY_TYPE_ATTR_UNSPECβ the unused one π literally just vibes, it does nothingNL_POLICY_TYPE_ATTR_TYPEβ the type of the attribute,enum netlink_attribute_type(U32) π this is the main characterNL_POLICY_TYPE_ATTR_MIN_VALUE_Sβ minimum value for signed integers (S64)NL_POLICY_TYPE_ATTR_MAX_VALUE_Sβ maximum value for signed integers (S64)NL_POLICY_TYPE_ATTR_MIN_VALUE_Uβ minimum value for unsigned integers (U64)NL_POLICY_TYPE_ATTR_MAX_VALUE_Uβ maximum value for unsigned integers (U64)NL_POLICY_TYPE_ATTR_MIN_LENGTHβ minimum length for binary attributes, and there's no minimum if it's not given (U32) πNL_POLICY_TYPE_ATTR_MAX_LENGTHβ maximum length for binary attributes, and there's no maximum if it's not given (U32) πNL_POLICY_TYPE_ATTR_POLICY_IDXβ the sub policy for nested and nested array types (U32) πͺ it's giving nesting doll energyNL_POLICY_TYPE_ATTR_POLICY_MAXTYPEβ maximum sub policy attribute for nested and nested array types, and this can in theory be<the size of the policy pointed to by the index, if it's limited inside the nesting (U32) π yes bestie, read that twiceNL_POLICY_TYPE_ATTR_BITFIELD32_MASKβ the valid mask for the bitfield32 type (U32) β¨NL_POLICY_TYPE_ATTR_PADβ pad attribute for 64-bit alignment π§ alignment is self-care, fr frNL_POLICY_TYPE_ATTR_MASKβ mask of valid bits for unsigned integers (U64) π₯__NL_POLICY_TYPE_ATTR_MAXβ number of attributesNL_POLICY_TYPE_ATTR_MAXβ highest attribute number β
bestie reminder:NL_POLICY_TYPE_ATTR_UNSPECis unused, andNL_POLICY_TYPE_ATTR_POLICY_MAXTYPEcan in theory be<the size of the policy pointed to by the index if it's limited inside the nesting. that's not me being shady, that's literally what the docs say π
π¦ SEE ALSO π¦
go read these next, bestie, they're all connected:
- Kernel file
./include/uapi/linux/netlink.h struct nlmsghdr(9)enum nlmsgerr_attrs(9)enum netlink_attribute_type(9)
okay and finally, the receipts π§Ύ: this page lives under ./include/uapi/linux, it's stamped October 2026, and it goes by enum netlin...cy_type_attr(9) in the Kernel API Manual. that's the whole thing, you ate that, periodt π
πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms