SCTP_GETADDRLEN(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… NAME πŸ’…

Okay bestie, this is sctp_getaddrlen(3) from the Library Functions Manual β€” the function that returns the address length of an address family. Periodt.

πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc).

✨ SYNOPSIS ✨

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

int
sctp_getaddrlen(sa_family_t family);

🫢 DESCRIPTION 🫢

The sctp_getaddrlen() function returns the size of a specific address family. It's there for application binary compatibility, because it hands your app the size that the operating system thinks that specific address family is. Iconic ABI-support behavior, honestly.

Important detail, no cap: the function will actually create an SCTP socket and then gather the information via getsockopt() system calls. If for some reason an SCTP socket cannot be created, or the getsockopt() call fails, an error will be returned with errno set as specified in the socket() or getsockopt() system call.

πŸŽ€ RETURN VALUES πŸŽ€

The call returns the number of bytes that the operating system expects for the specific address family, or -1. That's the whole vibe check.

πŸ’€ ERRORS πŸ’€

The sctp_getaddrlen() function can return the following errors:

  • [EINVAL] β€” The address family specified does NOT exist.

πŸ‘€ SEE ALSO πŸ‘€


xoxo from Debian πŸ’– dated December 15, 2006 🫢✨

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms