svc_tcp_recvfrom(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to the svc_tcp_recvfrom(9) page from the Kernel API Manual πŸ’… β€” it's literally all about receiving data from a TCP socket, and yes, we're gonna get into it.

svc_tcp_recvfrom β€” receive data from a TCP socket 🫢


✨ SYNOPSIS ✨

int svc_tcp_recvfrom (struct svc_rqst *rqstp );

πŸŽ€ ARGUMENTS πŸŽ€

  • rqstp β€” the request structure into which to receive an RPC Call. that's the whole vibe of this parameter, no cap πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this one gets called in a loop when XPT_DATA has been set. periodt.

first it reads the 4-byte stream record marker, then it uses the record length in that marker to set up exactly the resources needed to receive the next RPC message into rqstp. iconic resource-planning behavior, honestly 🌸

the zero return case handles partial receives and callback Replies. and the state of a partial receive is preserved in the svc_sock for the next call to svc_tcp_recvfrom β€” so it picks up right where it left off, bestie πŸ’«


⭐ RETURN ⭐

on success, it gives you the number of bytes in a received RPC Call, or 0 if a complete RPC Call message was not ready to return. that's it, that's the return value πŸŽ€


πŸ”₯ SEE ALSO πŸ”₯

the kernel file is ./net/sunrpc/svcsock.c β€” go check it out if you're feeling nosy πŸ‘€


okay bye bestie πŸ’– β€” source/version: ./net/sunrpc, date: October 2026, page: svc_tcp_recvfrom(9) ✨

πŸ“¦ where this page comes from