libnvme(2)
π libnvme(2) β API Manual π
okay so bestie, welcome to the libnvme manual, section 2 (that's the API/system-calls girlies β¨). today's main character is a little struct called struct nbft_info_subsystem_ns, and she's literally the blueprint for Subsystem Namespace (SSNS) info. no cap, she's kind of a big deal π
πΈ NAME πΈ
struct nbft_info_subsystem_ns β Subsystem Namespace (SSNS) info π
β¨ SYNOPSIS β¨
here's the whole fit, every field, verbatim, because we do not gatekeep π«Ά
struct nbft_info_subsystem_ns {
int index;
struct nbft_info_discovery *discovery;
struct nbft_info_security *security;
int num_hfis;
struct nbft_info_hfi **hfis;
char transport[8];
char traddr[40];
char *trsvcid;
__u16 subsys_port_id;
__u32 nsid;
enum nbft_info_nid_type nid_type;
__u8 *nid;
char *subsys_nqn;
bool pdu_header_digest_required;
bool data_digest_required;
int controller_id;
int asqsz;
char *dhcp_root_path_string;
bool discovered;
bool unavailable;
};
π Members π
field by field, no skipping, we're thorough in this house π
indexβ the SSNS Descriptor Index in the descriptor list. basically her seat number at the table πdiscoveryβ the Primary Discovery Controller that's associated with this SSNS Descriptor. her bestie, her plus-one π«securityβ the Security Profile Descriptor associated with this namespace. the bodyguard situation π‘οΈnum_hfisβ Number of HFIs. just the count, periodt π’hfisβ the List of HFIs associated with this namespace. it includes the primary HFI at the first position and all the secondary HFIs. and bestie, listen: this array is null-terminated, so don't go wandering past the end, she'll let you know when she's done πtransportβ the Transport Type string (liketcp, for example). think of it as her vibe/flavor of transport πtraddrβ Subsystem Transport Address. where she lives πtrsvcidβ Subsystem Transport Service Identifier. the "which door" of it all πͺsubsys_port_idβ The Subsystem Port ID. lowkey just the port's whole identity β¨nsidβ The Namespace ID of this descriptor, or whennidshould be used instead. she's conditional, she contains multitudes π¦nid_typeβ the Namespace Identifier Type, seeenum nbft_info_nid_typeif you wanna know more πnidβ The Namespace Identifier value itself πsubsys_nqnβ Subsystem and Namespace NQN. her government name, fr fr πpdu_header_digest_requiredβ PDU Header Digest (HDGST) Flag: the use of NVM Header Digest Enabled is required. so like, required-required, no skipping π¨data_digest_requiredβ Data Digest (DDGST) Flag: the use of NVM Data Digest Enabled is required. same energy, also mandatory π₯controller_idβ Controller ID (SSNS Extended Information Descriptor): the controller ID associated with the Admin Queue, or0if not supported. zero means "girl, not supported" πasqszβ Admin Submission Queue Size (SSNS Extended Information Descriptor), or0if not supported. same deal,0= no support π«dhcp_root_path_stringβ DHCP Root Path Override string (SSNS Extended Information Descriptor). she's the override, she's the exception, she's THAT girl πdiscoveredβ Indicates that this namespace was acquired through discovery. so she was found, not assigned πunavailableβ Namespace is unavailable as indicated by the pre-OS driver. she's on do-not-disturb, pls respect it π
ngl none of this is dangerous, it's all just descriptor info. the only real trap is that hfis array being null-terminated β respect the terminator or you'll be reading garbage memory and that's giving undefined behaviour π
that's the whole page bestie, you ate it ππ§ go forth and query your SSNS with confidence β¨
kisses, this was struct nbft_info_subsystem_ns from the libnvme(2) API Manual β July 2026 edition. mwah π
π¦ 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