xs_tcp_tls_setup_socket(9)
π xs_tcp_tls_setup_socket(9) β like, the TLS-on-TCP glow-up, bestie β¨
okay so this is a page from the Kernel API Manual, and it's about xs_tcp_tls_setup_socket β the function that literally gets a TLS session up and running on a TCP socket π ngl it's kind of iconic.
πΈ NAME πΈ
xs_tcp_tls_setup_socket β establish a TLS session on a TCP socket π
β¨ SYNOPSIS β¨
void xs_tcp_tls_setup_socket (struct work_struct *work );
π«Ά ARGUMENTS π«Ά
workβ the queued work item, bestie. that's it. that's the whole argument π©·
π₯ DESCRIPTION π₯
Okay so picture this: this function gets invoked by a work queue tasklet. very demure, very scheduled π
Now for RPC-with-TLS, there's a two-stage connection process β yes, two stages, it's giving main character energy with a plot twist β¨
The "upper-layer xprt" is the one visible to the RPC consumer π Once it's been marked connected, the consumer knows that a TCP connection and a TLS session have both been established. slay π
Then there's a "lower-layer xprt" β created right here in this function β and it handles all the mechanics: connecting the TCP socket, performing the RPC_AUTH_TLS probe, and then driving the TLS handshake π Once all of that is complete? The upper-layer xprt gets marked connected. periodt. π₯
no cap, the lower-layer xprt is the one doing all the heavy lifting behind the scenes. it's giving backstage crew at the awards show π
π SEE ALSO π
Kernel file ./net/sunrpc/xprtsock.c β and the whole friend group π«Ά:
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_local_state_change(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_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)
okay that's the whole page, bestie β go forth and handshake π π
with love from ./net/sunrpc, dated October 2026, on behalf of xs_tcp_tls_setup_socket(9) β mwah πβ¨
π¦ 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