join_classid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

join_classid(9) πŸŽ€

Kernel API Manual bestie, we are looking at join_classid(9), and it is lowkey giving β€œtiny helper, big cgroupv1 energy” ✨

🌸 NAME 🌸

join_classid β€” join a cgroupv1 net_cls classid πŸ’…

✨ SYNOPSIS ✨

int join_classid (void );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • void β€” no arguments, bestie. Literally none. Not a single one. 🫢

πŸ’– DESCRIPTION πŸ’–

Okay so this function expects the cgroup work dir to be already created, because we join it right here. No cap.

That’s what causes the process sockets to be tagged with the given net_cls classid. Iconic behavior, honestly πŸ”₯

On success, it returns 0. Otherwise, on failure, it returns 1. Periodt.

🌈 SEE ALSO 🌈

Kernel file ./tools/testing/selftests/bpf/cgroup_helpers.c is right there in the mix, and then there’s this whole squad β€” go read them too, iykyk πŸ‘‘


Kernel API Manual, source/version ./tools/testing/selftests/bpf, October 2026 β€” bye bestie, mwah πŸ’–

πŸ“¦ where this page comes from