tb_switch_depth(9)
π tb_switch_depth β the Kernel API Manual moment
ok so bestie, we're in the tb_switch_depth(9) page, which lives in the Kernel API Manual, and it's literally the tiniest little function and honestly? kinda iconic for it. it does one thing. it tells you how deep your router is sitting. that's the whole vibe check. β¨
πΈ NAME πΈ
tb_switch_depth β returns the depth of the connected router π
like, its level in the tree, no cap.
β¨ SYNOPSIS β¨
int tb_switch_depth (const struct tb_switch *sw);
that's it. that's the whole signature. ate and left no crumbs π«Ά
π¦ ARGUMENTS π¦
swβ the router π (yes that's the entire description, she's a woman of few words and honestly, respect)
π RETURN π
Router depth level, as a number. π₯ literally just a number. that's the gift. that's the whole present.
π SEE ALSO π
ok so this is the part where the manpage just dumps the entire friend group in the group chat π and we're NOT skipping any of them, every single one is getting their moment bestie:
Kernel file ./drivers/thunderbolt/tb.h and also: struct tb_nvm(9), enum tb_switch_tmu_mode(9), struct tb_switch_tmu(9), struct tb_switch(9), struct tb_bandwidth_group(9), struct tb_port(9), struct usb4_port(9), struct tb_retimer(9), struct tb_path_hop(9), enum tb_path_port(9), struct tb_path(9), struct tb_cm_ops(9), tb_upstream_port(9), tb_is_upstream_port(9), tb_port_has_remote(9), tb_domain_event(9), tb_switch_for_each_port(9), tb_switch_downstream_port(9), tb_switch_is_icm(9), tb_switch_tmu_is_configured(9), tb_switch_tmu_is_enabled(9), tb_switch_clx_is_enabled(9), tb_port_path_direction_downstream(9), tb_for_each_port_on_path(9), tb_for_each_upstream_port_on_path(9), tb_path_for_each_hop(9), tb_downstream_route(9), tb_xdomain_downstream_port(9), usb4_switch_version(9), tb_switch_is_usb4(9), enum usb4_sb_target(9), enum usb4_margin_sw_error_counter(9), struct usb4_port_margining_params(9).
like, the whole squad showed up. main character energy from every single one π§π
ngl there are no caveats on this page β no dangerous flags, no deprecated stuff, no environment variables, no exit statuses. it's just a depth, and she's thriving. π
k byeee, this page was brought to you by the good people over at ./drivers/thunderbolt, dated October 2026, and it's still serving tb_switch_depth(9) realness to this very day πΈβ don't forget to hydrate and to check your router's depth, ily π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms