svc_tcp_recvfrom(9)
π 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 π
svc_tcp_release_ctxt(9)svc_udp_release_ctxt(9)svc_tcp_handshake_done(9)svc_tcp_handshake(9)svc_udp_recvfrom(9)svc_udp_sendto(9)svc_tcp_sendto(9)svc_addsock(9)
okay bye bestie π β source/version: ./net/sunrpc, date: October 2026, page: svc_tcp_recvfrom(9) β¨
π¦ 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