xprt_sock_sendmsg(9)
π NAME π
Okay bestie, welcome to the Kernel API Manual page for xprt_sock_sendmsg(9) β the one where we write an xdr_buf directly to a socket, and the vibe is very kernel networking but make it cute πΈ.
β¨ SYNOPSIS β¨
int xprt_sock_sendmsg (struct socket *sock , struct msghdr *msg , struct
xdr_buf *xdr , unsigned int base , rpc_fraghdr marker , unsigned int
*sent_p );
Okay so this is the whole call, and yes the line breaks are giving kernel source realness π.
π ARGUMENTS π
sockβ the open socket to send on π«Ά.msgβ the socket message metadata.xdrβ thexdr_bufcontaining this request.baseβ the starting position in the buffer.markerβ the stream record marker field.sent_pβ the place where it returns the total number of bytes successfully queued for sending. Lowkey important, bestie π.
π¦ DESCRIPTION π¦
Return values, because we're not leaving you guessing: on success, this returns zero and fills in sent_p β¨. And if sock is not a struct socket, it's -ENOTSOCK β that's the exact return value, no cap π.
Bestie, that's the whole description: success is zero plus a filled-insent_p, and the not-a-socket case is-ENOTSOCK. Iconic, concise, we love to see it π.
π SEE ALSO π
Kernel file ./net/sunrpc/socklib.c, plus xdr_skb_read_bits(9) and csum_partial_copy_to_xdr(9) β go read those next, bestie π«Άπ.
Cute little sign-off: this page comes from source/version ./net/sunrpc, dated October 2026, and it's xprt_sock_sendmsg(9) β bye bestie, go queue those bytes πβ¨π
π¦ 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