SCTP_PEELOFF(3) Library Functions Manual SCTP_PEELOFF(3)

sctp_peeloff
detach an association from a one-to-many socket to its own fd

Standard C Library (libc, -lc)

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

int
sctp_peeloff(int s, sctp_assoc_t id);

The sctp_peeloff() function attempts detach the association specified by id into its own separate socket.

The call returns -1 on failure and the new socket descriptor upon success.

The sctp_peeloff() function can return the following errors:
[]
The size of the address list exceeds the amount of data provided.
[]
The argument s is not a valid descriptor.
[]
The id given to the call does not map to a valid association.
[]
The argument s is not a socket.

sctp(4)

Sockets API Extensions for the Stream Control Transmission Protocol (SCTP), RFC, 6458, December 2011.

This function first appeared in NetBSD 9.0.
August 1, 2018 NetBSD 9.0