SCTP_GETADDRLEN(3)
π 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
- Copyright (c) 1983, 1991, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms