libnvmf_tid_from_fields(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvmf_tid_from_fields πŸ’…

okay so this is a page straight out of the libnvme API manual, and the star of the show is libnvmf_tid_from_fields(9) β€” the little constructor that builds you a whole TID out of a pile of strings. bestie, it's giving assembly instructions but make it NVMe. πŸŽ€


✨ NAME ✨

libnvmf_tid_from_fields β€” allocate a TID from individual field strings. that's it, that's the whole job. 🫢


🌸 SYNOPSIS 🌸

int libnvmf_tid_from_fields (const char *transport , const char *traddr
, const char *trsvcid , const char *subsysnqn , const char *host_traddr
, const char *host_iface , const char *hostnqn , const char *hostid ,
struct libnvmf_tid **out );

nine parameters. yes, nine. she's highkey thorough and honestly? respect. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • transport β€” the transport type, like "tcp", "rdma", or "fc". this is the vibe check of how we're talking. ✨
  • traddr β€” the transport address. where we're headed, fr fr.
  • trsvcid β€” the transport service ID, e.g. "8009". the door number, not the street. πŸšͺ
  • subsysnqn β€” the subsystem NQN. iconic identifier energy.
  • host_traddr β€” the host transport address, or NULL if you're not about that life.
  • host_iface β€” the host interface name, or NULL.
  • hostnqn β€” the host NQN, or NULL.
  • hostid β€” the Host Identifier, or NULL.
  • out β€” the allocated TID on success; NULL on error. lowkey the most important one β€” this is where your shiny new TID lands. πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

so this is a convenience constructor. that's the whole mood: convenience. you hand it strings, it hands you back a TID. 🎁

NULL fields are stored as NULL β€” no surprises, no drama, it keeps them exactly as the void they are. πŸ•³οΈ

for an IP transport (tcp, rdma) a numeric traddr/host_traddr is canonicalized β€” meaning it gets tidied up into its proper form. but a hostname? nope. rejected. πŸ’€ because resolving it is the caller's job, not libnvme's. read it again, bestie: your job. not hers. she doesn't do DNS, she's not that kind of library. πŸ™ˆ


⭐ RETURN ⭐

  • 0 β€” slay, success. *out is the allocated TID. πŸ‘‘
  • -EINVAL β€” if out is NULL, or if traddr/host_traddr is not numeric on an IP transport. that's the invalid-argument special. 😭
  • -ENOMEM β€” allocation failure. the memory said no. πŸ’€
ngl, if you're getting -EINVAL on a tcp or rdma transport, go look at your traddr and host_traddr β€” she told you numeric only. and if out is NULL... bestie. that's the output pointer. come on. 🫢

🌈 SEE ALSO 🌈

no SEE ALSO section on this one β€” she's short, sweet, and self-contained. periodt. πŸ’…


and that's the whole page!! πŸ¦‹ this glorious little API page is the libnvmf_tid_from_fields page from the libnvme API manual, dated October 2026 β€” and oh my god, the header and footer literally both say libnvmf_tid_from_fields(9) too, so we're bookended by her name. iconic. mwah. πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from