xs_tcp_tls_setup_socket(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🫢:


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