SCTP_OPT_INFO(3)

πŸ“¦
version 1.0.21 Β· 3 versions
  • 1.0.21 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 14.5 Β· freebsd 14.5
  • 15.1 Β· freebsd 15.1
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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, id is 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 that arg points 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_info returns 0. slay. πŸŽ‰
  • on failure, -1 is returned, and errno gets set to the appropriate error code. so if things go sideways, check your errno bestie, she's telling you what happened. πŸ”₯

🌈 SEE ALSO 🌈

go read these next, they're all part of the same friend group:


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