xprt_sock_sendmsg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the xdr_buf containing 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-in sent_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