genl_sk_priv_get(9)
π genl_sk_priv_get(9) β a Kernel API Manual moment π
okay so bestie, welcome to the Kernel API Manual, and today's main character is genl_sk_priv_get π she's a function, she's a vibe, and she's here to hand you a socket's very own private memory. no cap.
β¨ NAME β¨
genl_sk_priv_get β Get family private pointer for socket π«Ά
πΈ SYNOPSIS πΈ
void * genl_sk_priv_get (struct genl_family *family , struct sock *sk );
π¦ ARGUMENTS π¦
familyβ the family π« (yes literally, that's the whole description, it's giving mysterious icon energy)skβ the socket π
π DESCRIPTION π
So here's the tea β β she looks up the private memory for a Generic netlink family and the socket you specified. And if that private memory hasn't been allocated yet? She just... allocates it for you. no big deal. obsessed with a self-starter honestly π
π RETURN π
On success you get a valid pointer β¨ otherwise you get a negative error value, encoded by ERR_PTR π so like, check it, bestie, fr fr.
π SEE ALSO π
- Kernel file
./net/netlink/genetlink.cπ β also go say hi to__genl_sk_priv_get(9),genl_register_family(9),genl_unregister_family(9), andgenlmsg_put(9)π§
lowkey important reminder: this page lives at ./net/netlink, and she was last touched in October 2026 β so yeah, she's fresh π
and that's the whole page bestie, slay, ate, periodt πΈππ
π¦ 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