2 .\" Copyright (c) 2004, Sun Microsystems, Inc.
3 .\" All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH SCTP_PEELOFF 3SOCKET "Mar 05, 2004"
9 sctp_peeloff \- branch off existing association from a one-to-many SCTP socket
10 to create a one-to-one STP socket
14 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsocket\fR \fB -lnsl \fR \fB -lsctp \fR [ \fIlibrary\fR... ]
15 #include <sys/types.h>
16 #include <sys/socket.h>
17 #include <netinet/sctp.h>
19 \fBint\fR \fBsctp_peeloff\fR(\fBint\fR \fIsock\fR, \fBsctp_assoc_t\fR \fIid\fR);
24 The \fBsctp_peeloff()\fR function branches off an existing association from a
25 one-to-many style SCTP socket into a separate socket file descriptor. The
26 resulting branched-off socket is a one-to-one style SCTP socket and is confined
27 to operations allowed on a one-to-one style SCTP socket.
30 The \fIsock\fR argument is a one-to-many socket. The association specified by
31 the \fIid\fR argument is branched off \fIsock\fR.
34 Upon successful completion, the \fBsctp_peeloff()\fR function returns the file
35 descriptor that references the branched-off socket. The function returns
36 \fB-1\fR if an error occurs.
39 The \fBsctp_peeloff()\fR function fails under the following conditions.
43 \fB\fBEOPTNOTSUPP\fR\fR
46 The \fIsock\fR argument is not a one-to-many style SCTP socket.
55 The \fIid\fR is \fB0\fR or greater than the maximum number of associations for
65 Failure to create a new user file descriptor or file structure.
70 See \fBattributes\fR(5) for descriptions of the following attributes:
78 ATTRIBUTE TYPE ATTRIBUTE VALUE
80 Interface Stability Evolving
87 \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBsocket\fR(3SOCKET), \fBsctp\fR(7P)