libnvmf_tid_parse(9)
π libnvmf_tid_parse β libnvme API manual, section 9 β¨
okay so bestie, buckle up, because this is the libnvmf_tid_parse(9) page and it's literally about turning one little string into a whole entire TID. iconic behavior tbh π
πΈ NAME πΈ
libnvmf_tid_parse β allocate a TID from a semicolon-separated key=value string. yes, that's the whole vibe. π¦
β SYNOPSIS β
int libnvmf_tid_parse (struct libnvme_global_ctx *ctx , const char *str
, struct libnvmf_tid **out );
π ARGUMENTS π
ctxβ the global context. honestly it's only here so it can log the diagnostics mentioned below. main character energy: low, but it is on the cast list. πstrβ the input string, like for example:
"transport=tcp;traddr=1.2.3.4;trsvcid=8009"
yes bestie that's a whole connection in one line, slay π
outβ on success, the allocated TID lives here. on error?NULL. no cap. π
π₯ DESCRIPTION π₯
The recognized keys are the "nvme connect" option names, periodt:
transporttraddrtrsvcidnqnhost-traddrhost-ifacehostnqnhostid
so far so good, right? but lowkey here's the little mapping tea β: the "nqn", "host-traddr", and "host-iface" string keys map onto the struct's subsysnqn, host_traddr, and host_iface fields β those field names follow the C-identifier convention, which is why they don't match the key spelling. iykyk π§
now for the messy part, and i'm gonna be so fr fr with you:
Unknown keys, bare keys (no =), and empty values are logged at WARN level and skipped. Whitespace around keys and values is trimmed. so like, don't panic, it just quietly side-eyes them and moves on. π
and the big one: like libnvmf_tid_from_fields, a traddr/host-traddr that is not numeric on an IP transport fails the whole parse. not just that one key β the whole parse. it's giving all-or-nothing π
π RETURN π
0on success β and*outis the allocated TID, we love a happy ending π-EINVALifctx,outorstrisNULL, or atraddr/host-traddris not numeric on an IP transport π«-ENOMEMon allocation failure β the malloc said no and we respect it π
π SEE ALSO π
okay technically this original page didn't give us a SEE ALSO section, so there's nothing to list here β but like, libnvmf_tid_from_fields gets a shoutout up in DESCRIPTION, so go say hi to that one bestie π«Ά
and that's the page!! πΈ written under the libnvme banner, version dated October 2026, and the footer still says libnvmf_tid_parse(9) because some things are eternal. mwah, go parse some TIDs, you're gonna ate π
β¨
π¦ 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