tb_xdomain_alloc_in_hopid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ tb_xdomain_alloc_in_hopid (9) β€” Kernel API Manual ✨

Okay so bestie, welcome to the Kernel API Manual, grab a lil snack πŸ“ because we're about to talk about allocating an input HopID for tunneling. Yes, that's the NAME, and yes, it's exactly as iconic as it sounds πŸ’…


🌈 SYNOPSIS

int tb_xdomain_alloc_in_hopid (struct tb_xdomain *xd , int hopid );

Literally that's the whole signature. Look at it. Gorgeous. No notes πŸ”₯


πŸŽ€ ARGUMENTS

  • xd β€” the XDomain connection, your main character in this whole operation πŸ’–
  • hopid β€” your preferred HopID, or you can pass -1 and let the kernel pick the next available one for you, king behaviour honestly πŸ‘‘

πŸ¦‹ DESCRIPTION

So here's the tea β˜•: the HopID you get back is guaranteed to be within the range supported by the input lane adapter. Like, it's not gonna hand you something out of range, no cap. Fr fr.

And when you're done with it? You gotta call tb_xdomain_release_in_hopid to release the allocated HopID. Don't just leave it lying around, that's not the vibe πŸ™ˆ

Bestie please remember the release call. Allocated resources don't clean themselves up, iykyk πŸ’€

⭐ RETURN

  • Allocated HopID β€” on success πŸŽ‰ slay, you got one!
  • -ENOSPC β€” when there are literally no more available HopIDs left 😭 it's giving empty shelf energy
  • Negative errno β€” some other error happened, check the errno and see what's up 🫢

πŸ‘‘ SEE ALSO

Kernel file ./drivers/thunderbolt/xdomain.c, plus the whole friend group:


And that's the page, bestie! 🧚 This came out of ./drivers/thunderbolt and it's dated October 2026 β€” mwah, love that for us πŸ’œπŸ’‹

πŸ“¦ where this page comes from