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 to 5h, 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 at enum nbft_security_flags for the lore πŸ”
  • secret_type β€” the Secret Type. the details live over in enum 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 to 1h, 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 to 0h? then this field is reserved 🚫
  • auth_proto_obj β€” the Authentication Protocols Heap Object Reference. if the Authentication Policy List field is set to 1h, 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 to 0h, 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 to 1h, 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 to 0h, 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 to 1h, 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 to 0h, 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 to 1h, 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 to 0h, 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 to 0h, 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