xs_local_state_change(9)
π xs_local_state_change(9) β like, the AF_LOCAL socket state-change callback, bestie β¨
okay so this is section 9 of the Kernel API Manual, and honestly? it's a tiny little page but it matters π the manual name is xs_local_state_change(9) iykyk, and today we're learning what it does when a socket decides to switch up its whole vibe.
β¨ NAME β¨
xs_local_state_change β the callback that handles state changes on an AF_LOCAL socket π¦
like, when your local socket goes through a glow-up (or a glow-down π), this is the function that gets the 411.
β¨ SYNOPSIS β¨
void xs_local_state_change (struct sock *sk );
that's it. that's the whole signature. void in, void out β no return value, no drama, just vibes π
(ok fine, sk goes in, but you get me)
πΈ ARGUMENTS πΈ
skβ the socket whose state has changed π«Ά that's the whole argument. she's the main character here, the icon, the moment. the socket in question. the one going through it.
not me reminding you that it's literally just one argument π sk, the socket whose state has changed. periodt.
π§ SEE ALSO π§
okay prepare yourself, because this cross-reference list is iconic and also LONG β she ate and left absolutely no crumbs π the kernel file in question is ./net/sunrpc/xprtsock.c and here's every single sibling in the family:
xs_nospace(9)xs_local_send_request(9)xs_udp_send_request(9)xs_tcp_send_request(9)xs_error_report(9)xs_close(9)xs_destroy(9)xs_udp_data_read_skb(9)xs_data_ready(9)xs_tcp_state_change(9)xs_udp_write_space(9)xs_tcp_write_space(9)xs_udp_set_buffer_size(9)xs_udp_timer(9)xs_set_port(9)xs_local_setup_socket(9)xs_enable_swap(9)xs_disable_swap(9)xs_tcp_shutdown(9)xs_tcp_setup_socket(9)xs_tls_handshake_done(9)xs_tcp_tls_setup_socket(9)xs_connect(9)xs_local_print_stats(9)xs_udp_print_stats(9)xs_tcp_print_stats(9)bc_send_request(9)xs_setup_local(9)xs_setup_udp(9)xs_setup_tcp(9)xs_setup_tcp_tls(9)xs_setup_bc_tcp(9)init_socket_xprt(9)cleanup_socket_xprt(9)
thirty-four of them. ngl that's a whole group chat π but every single one is right there, no cap, don't skip a single reference bestie π
π sign-off π
so yeah, that's the tea β this page lives in ./net/sunrpc, it's dated October 2026, and it's filed under the xs_local_state_change(9) header in the Kernel API Manual. go forth and be obsessed with socket state changes π
β¨π¦
reminder: the vibe changed, the facts did not π«Ά
π¦ 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