libnvme(9)
π libnvme(9) β API Manual, bestie edition β¨
okay so this is libnvme(9), the API manual, and today's main character is a struct that's lowkey the whole personality of an NVMe/TCP boot setup. it lives in the libnvme API manual and it is so specific. buckle up π
πΈ NAME πΈ
struct libnbft_hfi_info_tcp β the HFI Transport Info Descriptor for NVMe/TCP. that's it, that's the vibe π
β¨ SYNOPSIS β¨
struct libnbft_hfi_info_tcp {
__u32 pci_sbdf;
__u8 mac_addr[6];
__u16 vlan;
__u8 ip_origin;
char ipaddr[40];
__u8 subnet_mask_prefix;
char gateway_ipaddr[40];
__u16 route_metric;
char primary_dns_ipaddr[40];
char secondary_dns_ipaddr[40];
char dhcp_server_ipaddr[40];
char *host_name;
__u8 flags;
__u8 pcie_seg_num;
__u32 dhcp_iaid;
__u8 dhcp_duid[130];
__u8 dhcp_duid_len;
};
look at her. seventeen fields. zero notes. iconic π
π¦ Members π¦
bestie, here's every single member, no skips, no "you get the idea" β we do not do that here π ββοΈ
pci_sbdfβ the PCI Express Routing ID for the HFI Transport Function. that's the "where do i even find this thing on the bus" field πmac_addrβ MAC Address: literally the MAC address of this HFI, in EUI-48TM format. six bytes of pure identity πvlanβ the VLAN identifier if the VLAN is associated with this HFI, as defined in IEEE 802.1q-2018, or zeroes if no VLAN is associated with this HFI. no vlan? it's giving zeroes πΈip_originβ the source of the Ethernet L3 configuration information used by the driver, or0if not used. so like, where did the IP config come from, and0means "nobody, it's not used" π«Άipaddrβ the IPv4 or IPv6 address of this HFI. yes either one, she contains multitudes β¨subnet_mask_prefixβ the IPv4 or IPv6 subnet mask in CIDR routing prefix notation. the slash-number energy πgateway_ipaddrβ the IPv4 or IPv6 address of the IP gateway for this HFI, or zeroes if no IP gateway is specified. no gateway? zeroes. we stan a consistent default πroute_metricβ the cost value for the route indicated by this HFI. it's the toll fee for your packets, fr fr π£οΈprimary_dns_ipaddrβ the IPv4 or IPv6 address of the Primary DNS server for this HFI. the first bestie you ask for directions π₯secondary_dns_ipaddrβ the IPv4 or IPv6 address of the Secondary DNS server for this HFI. the backup bestie, still valid, still loved π«dhcp_server_ipaddrβ the IPv4 or IPv6 address of the DHCP server used to assign this HFI address. shoutout to the server that handed out the lease πhost_nameβ the Host Name string. note that she's achar *, a pointer, miss independent π«flagsβ HFI Transport Flags bitmask, seeenum nbft_hfi_info_tcp_flags. bitmask behaviour, always check the enum, iykyk π©pcie_seg_numβ the PCIe Segment Number for the HFI Transport Function when the PCI Express Link is in Flit mode. it'sZeroif not in Flit mode, not supported, or the NBFT data originates from a pre-NBFT rev. 1.1 driver. so many reasons to be zero and honestly same πdhcp_iaidβ the DHCP Identity Association Identifier (IAID) as defined in RFC 4361. the IAID is a 32-bit value that uniquely identifies the client's network interface for DHCP purposes. NBFT rev. 1.1+; meaningful whendhcp_duid_lenis non-zero. so ifdhcp_duid_lenis zero, this girl is not speaking to you πdhcp_duidβ the raw DHCP Unique Identifier (DUID) as defined in RFC 8415 section 11 (NBFT rev. 1.1+). this is the complete DUID including its leading 2-byte type code followed by up to 128 bytes of type-specific identifier data. the known DUID type codes are:1(DUID-LLT, link-layer address plus time),2(DUID-EN, vendor-assigned based on enterprise number),3(DUID-LL, link-layer address),4(DUID-UUID, universally unique identifier). multi-byte fields within the DUID are stored in little-endian byte order as specified by the NVMe Boot Specification. the consumer is responsible for parsing the type code and the type-specific data. this is a local copy of the data from the NBFT heap. this array is zero-filled when the DUID is not present; checkdhcp_duid_len. okay that was a lot but every word of it matters, do not skip the parsing part, the parsing part is on you π«΅dhcp_duid_lenβ the number of valid bytes indhcp_duid, ranging from3(minimum: 2-byte type code plus at least 1 byte of data) to130(maximum per RFC 8415). NBFT rev. 1.1+. a value of zero indicates that no DUID is present and bothdhcp_duidanddhcp_iaidshould be ignored. so zero means ignore both, periodt π«
β οΈ real talk:dhcp_duidis a local copy from the NBFT heap, it's zero-filled when there's no DUID, and you are the one parsing the type code and the type-specific data. nobody's doing that for you, bestie. checkdhcp_duid_lenfirst, always π
and that's the whole page, no cap. this was struct libnbft_hfi_info_tcp from the libnvme(9) API manual, dated October 2026 β go forth and parse those DUIDs with main character energy π¦π
β¨
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms