tb_available_bandwidth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tb_available_bandwidth(9) β€” like, the whole vibe πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ this one's about available bandwidth for tunneling and ngl it's lowkey iconic. no cap, it's a whole function. let's get into it 🫢


✨ NAME ✨

tb_available_bandwidth β€” available bandwidth for tunneling πŸŽ€


✨ SYNOPSIS ✨

int tb_available_bandwidth (struct tb *tb , struct tb_port *src_port ,
struct tb_port *dst_port , int *available_up , int *available_down ,
bool include_asym );

✨ ARGUMENTS ✨

  • tb β€” the domain structure, aka the whole main character of the setup πŸ‘‘
  • src_port β€” source protocol adapter, where the vibes come from 🌸
  • dst_port β€” destination protocol adapter, where the vibes are going πŸ¦‹
  • available_up β€” available bandwidth upstream, in Mb/s ⬆️
  • available_down β€” available bandwidth downstream, in Mb/s ⬇️
  • include_asym β€” include bandwidth if the link is switched from symmetric to asymmetric, iykyk πŸ”€

✨ DESCRIPTION ✨

so basically: this calculates the maximum available bandwidth for protocol tunneling between src_port and dst_port at the moment, like right now, fr fr. ⏰

and how does it do that? it's the minimum of maximum link bandwidth across all links, reduced by the currently consumed bandwidth on that link. the way that math just works πŸ˜­πŸ’…

if include_asym is true, then it also includes the bandwidth that can be added when the links are transitioned into asymmetric β€” but bestie, hear me: it does not transition the links. it just counts it. πŸ™ˆ no funny business.


✨ RETURN ✨

0 on success, negative errno otherwise. slay when it's zero, sad when it's not πŸ’€


✨ SEE ALSO ✨


ngl this one lives in ./drivers/thunderbolt, dated October 2026, and it's the tb_available_bandwidth(9) page β€” go read the whole set, they ate πŸ”₯πŸ‘‘

mwah, ily, go read a manpage today πŸ§šπŸ’œ

πŸ“¦ where this page comes from