SCTP_GENERIC_RECVMSG(2)

πŸ’Œ SCTP_GENERIC_RECVMSG πŸ’Œ

okay bestie, welcome to the System Calls Manual, section 2 β€” we're talking about sctp_generic_recvmsg(2), and she's a whole vibe. let's get into it ✨


🌸 NAME 🌸

sctp_generic_recvmsg β€” receive data from a peer


πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc) β€” the classic, the icon, the one you already have πŸ’…


✨ SYNOPSIS ✨

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>

int
sctp_generic_recvmsg(int s, struct iovec *iov, int iovlen,
    struct sockaddr *from, socklen_t *fromlen,
    struct sctp_sndrcvinfo *sinfo, int *msgflags);

like, look at her. seven args. main character energy fr fr 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: sctp_generic_recvmsg() is the true system call that the sctp_recvmsg(3) function call uses underneath. it's giving "the real one behind the curtain" 😭

the way that this call is more efficient because it is a true system call?? obsessed. but bestie, listen β€” it's specific to FreeBSD, and you can expect it to not be present on any other operating system. no cap. it's FreeBSD-only, periodt. πŸ”₯

for detailed usage, please see the sctp_recvmsg(3) function call. she's got the full tutorial, this one's just the fast lane πŸ’–


πŸ‘‘ RETURN VALUES πŸ‘‘

  • on success: the call returns the number of bytes read πŸŽ€
  • on failure: it returns -1 πŸ’€

🌈 ERRORS 🌈

  • [EBADF] β€” the argument s is not a valid descriptor. bestie that's not a real one, try again πŸ™ˆ
  • [ENOTSOCK] β€” the argument s is not a socket. close but not quite, that's not a socket at all 😭

πŸ”— SEE ALSO πŸ”—


and that's the whole page, bestie!! you ate that. πŸ’…

this was brought to you by the Debian crew, dated October 30, 2007 β€” yeah she's vintage but she still slays, okurrr πŸ’œ

go forth and receive your data, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from