libnvme(2)
π libnvme β struct nbft_security π
okay bestie, so this is a page straight out of the API Manual for libnvme, and today's main character is struct nbft_security β the Security Profile Descriptor (Figure 21). yes, it's giving very "do not perceive me, i'm just a struct" energy, but she's actually lowkey essential, so let's get into it π«Ά
β¨ NAME β¨
struct nbft_security β Security Profile Descriptor (Figure 21). that's her, that's the whole vibe π
π¦ SYNOPSIS π¦
struct nbft_security {
__u8 structure_id;
__u8 index;
__le16 flags;
__u8 secret_type;
__u8 reserved1;
struct nbft_heap_obj sec_chan_alg_obj;
struct nbft_heap_obj auth_proto_obj;
struct nbft_heap_obj cipher_suite_obj;
struct nbft_heap_obj dh_grp_obj;
struct nbft_heap_obj sec_hash_func_obj;
struct nbft_heap_obj sec_keypath_obj;
__u8 reserved2[22];
};
look at her. twelve fields and a dream. no cap, every single one of these matters, so don't skip a single line π
πΈ Members πΈ
structure_idβ the Structure ID, bestie. this one shall be set to5h, aka Security, aka#NBFT_DESC_SECURITY. she knows who she is πindexβ the Security Profile Descriptor Index. it literally just tells you which number this Security Profile Descriptor is in the Security Profile Descriptor List. she's a numbered girlie in a numbered lineup β¨flagsβ the Security Profile Descriptor Flags. go peek atenum nbft_security_flagsfor the lore πsecret_typeβ the Secret Type. the details live over inenum nbft_security_secret_typeπreserved1β reserved. not for you, not for me, not for anyone. hands off πsec_chan_alg_objβ the Secure Channel Algorithm Heap Object Reference, iconique name, i know. so: if the Security Policy List field is set to1h, then this field tells you the location and size of a heap object holding a list of secure channel algorithms. that list is an array of bytes, and the values are defined in the Security Type (SECTYPE) field in the Transport Specific Address Subtype Definition in the NVMe TCP Transport Specification β yes that's a whole mouthful, i said what i said. and if the Security Policy List field is cleared to0h? then this field is reserved π«auth_proto_objβ the Authentication Protocols Heap Object Reference. if the Authentication Policy List field is set to1h, this field points you at the location and size of a heap object that contains a list of authentication protocol identifiers. if the Authentication Policy List field is cleared to0h, this field is reserved. simple as that, periodt πcipher_suite_objβ the Cipher Suite Offset Heap Object Reference. if the Cipher Suites Restricted by Policy bit is set to1h, this field gives you the location and size of a heap object containing a list of cipher suite identifiers. the list, if any, is an array of bytes, and those values are defined in the IANA TLS Parameters Registry. if the Cipher Suites Restricted by Policy bit is cleared to0h, this field is reserved πdh_grp_objβ the DH Groups Heap Object Reference. if the Authentication DH Groups Restricted by Policy List bit is set to1h, this field indicates the location and size of a heap object containing a list of DH-HMAC-CHAP Diffie-Hellman (DH) group identifiers. if that Authentication DH Groups Restricted by Policy List bit is cleared to0h, this field is reserved. she said conditional queen πsec_hash_func_objβ the Secure Hash Functions Offset Heap Object Reference. if the Secure Hash Functions Policy List bit is set to1h, this field tells you the offset in bytes of a heap object containing a list of DH-HMAC-CHAP hash function identifiers. that list is an array of bytes, and the values are defined in the NVM Express Base Specification. if the Secure Hash Functions Policy List bit is cleared to0h, this field is reserved πsec_keypath_objβ the Secret Keypath Offset Heap Object Reference. heads up, bestie, the original says "if" lowercase here, so we're matching that energy: if this field is set to a non-zero value, then it indicates the location and size of a heap object containing a URI. the type of that URI is specified in the Secret Type field. and if this field is cleared to0h, then this field is reserved π₯reserved2β reserved. a whole__u8 reserved2[22];of absolutely not-your-business. respect her privacy π
fr fr no cap: whenever a field says it's reserved, that means stay out of it. poke at reserved bits and you're in undefined-behaviour territory β and undefined behaviour does not pass the vibe check π
and that's the whole page, bestie, you ate that π slay β¨
cute little sign-off, since we're being thorough: this page is from the libnvme API Manual, dated July 2026, and it's the libnvme(2) page. mwah, go forth and reference your heap objects responsibly ππ¦π
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms