SCTP_GENERIC_SENDMSG(2)
β¨ SCTP_GENERIC_SENDMSG β¨
okay bestie, buckle up, this is the manual page for sctp_generic_sendmsg and sctp_generic_sendmsg_iov β and their whole entire job is sending data to a peer. that's it. that's the vibe. π
π LIBRARY
Standard C Library (libc, -lc) β yes she's fancy, yes she's built in π
π«Ά SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>
int
sctp_generic_sendmsg(int s, void *msg, int msglen, struct sockaddr *to,
socklen_t len, struct sctp_sndrcvinfo *sinfo, int flags);
int
sctp_generic_sendmsg_iov(int s, struct iovec *iov, int iovlen,
struct sockaddr *to, struct sctp_sndrcvinfo *sinfo, int flags);
like. look at those signatures. gorgeous. immaculate. πΈ
π DESCRIPTION
okay so here's the tea β β sctp_generic_sendmsg() and sctp_generic_sendmsg_iov() are the true system calls that live underneath the sctp_sendmsg(3) and sctp_send(3) function calls. the way that they're more efficient because they're true system calls?? iconic. they really said "we're not doing the wrapper thing, we're going straight to the kernel" and honestly? respect. π
but β and this is the part where I need you to focus β they are specific to FreeBSD. like, only FreeBSD. they can be expected not to be present on any other operating system. so if you're out here on Linux expecting to find these, bestie, no. she's not there. π
for detailed usage, please go see either the sctp_send(3) or sctp_sendmsg(3) function calls. they've got the full rundown, this page is just the β¨ lore β¨.
π¦ RETURN VALUES
- success β the call returns the number of bytes written π
- failure β the call returns
-1π
that's it, that's the whole story.
π¨ ERRORS
here's where things can go wrong, and I need you to know them all, no skipping:
[EBADF]β the argumentsis not a valid descriptor. like, that's not a socket, bestie, that's a random number. π[ENOTSOCK]β the argumentsis not a socket. fr fr. whatever you handed over is not a socket and she's not gonna pretend otherwise. β
if you see either of these, vibe check your file descriptor first. that's usually where the problem is. π
π SEE ALSO
go read these too, they're all part of the same little friend group:
and that's the page!! sending love, sending bytes, sending SCTP packets to your peer π«Άβ¨
this one came to you from Debian, dated October 30, 2007 β yeah she's an elder but she's still serving π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1983, 1991, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms