SCTP_OPT_INFO(3)
π SCTP_OPT_INFO(3) π
okay bestie, welcome to the SCTP_OPT_INFO page β Linux Programmer's Manual energy, but make it cute. this is a section 3 joint, so it's a library function, not a command. no cap. π«Ά
β¨ NAME β¨
sctp_optinfo β get options on a SCTP socket. that's it, that's the job. she's a getter. π
πΈ SYNOPSIS πΈ
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>
int sctp_opt_info(int sd, sctp_assoc_t id, int opt,
void * arg, socklen_t * size);
like, look at her. five arguments. she's giving main character energy and honestly? she earned it. β¨
π DESCRIPTION π
so sctp_opt_info is a wrapper library function, which is a fancy way of saying she's the friendly little helper you call when you wanna get SCTP-level options on a socket. the way that she justβ¦ retrieves stuff for you. obsessed. ππ
here's the breakdown of her little squad of arguments:
sdβ the socket descriptor for the socket you're asking about. your socket. your girl. π¦idβ for one-to-many style sockets, this specifies the association to query. for one-to-one style sockets,idis ignored β she doesn't even look at it, she's above that. πoptβ specifies the SCTP socket option you wanna get. (yes, the original spells it "specifes", we don't talk about that, moving on.) πargβ an option-specific structure buffer that you, the caller, provide. you bring the container, she fills it. it's giving teamwork. π«Άsizeβ this one is a value-result parameter and she's kinda the whole plot twist. you pass it in holding the size of the buffer thatargpoints to, and on return she modifies it to tell you the actual size of the value that came back. so she reads it, then she rewrites it. icon behaviour. π
π RETURN VALUE π
- on success,
sctp_opt_inforeturns0. slay. π - on failure,
-1is returned, anderrnogets set to the appropriate error code. so if things go sideways, check yourerrnobestie, she's telling you what happened. π₯
π SEE ALSO π
go read these next, they're all part of the same friend group:
sctp(7)sctp_bindx(3)sctp_connectx(3)sctp_sendmsg(3)sctp_sendv(3)sctp_send(3)sctp_recvmsg(3)sctp_recvv(3)sctp_peeloff(3)sctp_getpaddrs(3)sctp_getladdrs(3)
and that's the whole page, bestie!! π this one came from Linux 2.6, dated 2004-01-30, and lives under the name SCTP_OPT_INFO(3) β yes she's been around a while and yes she still ate. periodt. πβ¨π¦
π¦ where this page comes from
- alpine 3.22: lksctp-tools-doc 1.0.19-r5 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- alpine 3.23: lksctp-tools-doc 1.0.19-r5 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- alpine 3.24: lksctp-tools-doc 1.0.19-r5 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- arch rolling: lksctp-tools 1.0.21-1 Β· GPL-2.0-or-later AND LGPL-2.1-only
- centos-stream 10: lksctp-tools-devel 1.0.21-1.el10 Β· GPLv2 and GPLv2+ and LGPLv2 and MIT
- centos-stream 9: lksctp-tools-devel 1.0.19-2.el9 Β· GPLv2 and GPLv2+ and LGPLv2 and MIT
- centos-stream 9: lksctp-tools-devel 1.0.19-2.el9 Β· GPLv2 and GPLv2+ and LGPLv2 and MIT
- debian bookworm: libsctp-dev 1.0.19+dfsg-2 Β· GPL-2.0-or-later
- debian trixie: libsctp-dev 1.0.21+dfsg-1 Β· GPL-2.0-or-later
- fedora 43: lksctp-tools-devel 1.0.21-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-only AND MIT
- fedora 43: lksctp-tools-devel 1.0.21-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-only AND MIT
- fedora 44: lksctp-tools-devel 1.0.21-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-only AND MIT
- fedora 44: lksctp-tools-devel 1.0.21-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-only AND MIT
- nixos 26.05: lksctp-tools 1.0.21
- nixpkgs unstable: lksctp-tools 1.0.21
- opensuse-leap 16.0: lksctp-tools-devel 1.0.21-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: lksctp-tools-devel 1.0.21-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: lksctp-tools-devel 1.0.21-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: lksctp-tools-devel 1.0.21-160000.3.2 Β· LGPL-2.1-or-later
- ubuntu jammy: libsctp-dev 1.0.19+dfsg-1build1 Β· GPL-2.0-or-later
- ubuntu noble: libsctp-dev 1.0.19+dfsg-2build1 Β· GPL-2.0-or-later
- ubuntu questing: libsctp-dev 1.0.21+dfsg-1build1
- ubuntu resolute: libsctp-dev 1.0.21+dfsg-1build2 Β· GPL-2.0-or-later
- ubuntu stonking: libsctp-dev 1.0.21+dfsg-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms