libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’– libnvme(9) β€” the API Manual, bestie edition πŸ’–

okay so real talk, this is a page from the libnvme API Manual (that's the manual name, and yes it's iconic) and today we're deep-diving one very specific little struct. grab a strawberry drink, we're doing this πŸ“


🌸 NAME 🌸

struct nvmf_auth_kxchap_reply β€” the KX-HMAC-CHAP_Reply message, and it goes from host to controller. that's the direction, no cap. it's giving "the host replies, the controller listens" ✨


πŸŽ€ SYNOPSIS πŸŽ€

bestie, here's the whole thing, literally copied exactly because we do not mess with the source of truth:

struct nvmf_auth_kxchap_reply {
    __u8 auth_type;
    __u8 auth_id;
    __u16 rsvd2;
    __le16 t_id;
    __u8 hl;
    __u8 rsvd7;
    __u8 cvalid;
    __u8 rsvd9;
    __le16 kxvlen;
    __le32 seqnum;
    __u8 rval_cval_kxv[];
};

look at her. the flexible array member at the end? main character energy, fr fr πŸ’…


✨ Members ✨

okay now the field-by-field vibe check, and every single one is here because I would never do you dirty like that:

  • auth_type β€” the Authentication Type. see enum nvmf_auth_protocol_id for the lore. πŸ‘‘
  • auth_id β€” the Authentication Identifier. see enum nvmf_auth_kxchap_id, that's where the deets live.
  • rsvd2 β€” Reserved. that's it. she's reserved. respect her privacy πŸ™ˆ
  • t_id β€” the Transaction Identifier. iykyk πŸ¦‹
  • hl β€” Hash Length, aka length in bytes of the selected hash function. yes it's an abbreviation, yes it ate πŸ’…
  • rsvd7 β€” Reserved. again. still reserved. still not our business.
  • cvalid β€” Challenge Valid, and this one's important bestie: it's 01h if the Challenge Value inside rval_cval_kxv is valid (that means bidirectional authentication was requested), and 00h otherwise. lowkey the whole plot device of this struct 🌟
  • rsvd9 β€” Reserved. three for three on the silent treatment, honestly iconic.
  • kxvlen β€” KX Value Length, aka length in bytes of the KX Value carried in rval_cval_kxv. and listen: it gets cleared to 0h if no key exchange is performed. periodt.
  • seqnum β€” the Sequence Number, aka (S2). yes it has a nickname. we love a nickname 😌
  • rval_cval_kxv β€” okay this is the big one, the triple threat, the group chat of fields. it's the Response Value (R1, hl bytes), then the Challenge Value (C2, hl bytes, cleared to 0h if cvalid is 00h), then the KX Value (KXh, kxvlen bytes). and heads up: the KX Value is absent if kxvlen is cleared to 0h. so if you were expecting KXh and got nothing, that's why, don't panic πŸ”₯
ngl the reserved fields are just there holding space and honestly? same.

🌈 that's the whole page, no skips, no cuts, every byte accounted for. stay hydrated, read your enums, and remember: the KX Value is only there if kxvlen says so πŸ’œ

signed off with love β€” this was struct nvmf_auth_kxchap_reply from libnvme(9), dated October 2026, and yes the date is in the future, she's ahead of her time πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from