Synopsis

Description

The sctp_peeloff() function branches off an existing association from a one-to-many style SCTP
socket into a separate socket file descriptor. The resulting branched-off socket is a
one-to-one style SCTP socket and is confined to operations allowed on a one-to-one
style SCTP socket.

The sock argument is a one-to-many socket. The association specified by the id
argument is branched off sock.

Return Values

Upon successful completion, the sctp_peeloff() function returns the file descriptor that references the
branched-off socket. The function returns -1 if an error occurs.

Errors

The sctp_peeloff() function fails under the following conditions.

EOPTNOTSUPP

The sock argument is not a one-to-many style SCTP socket.

EINVAL

The id is 0 or greater than the maximum number of associations for sock.