[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

sctp_peeloff()

Branch off an association into a separate socket

Synopsis:

#include <netinet/sctp.h>

int sctp_peeloff(int sd, 
                 sctp_assoc_t assoc_id);

Library:

libsctp

Use the -l sctp option to qcc to link against this library.

Description:

You call this function to branch off an association into a separate socket. The new socket is a one-to-one style socket. You should confine your operation to one that is allowed for a one-to-one style socket.

Using sctp_peeloff(), you create a new socket descriptor as follows:

new_sd = sctp_peeloff(int sd, sctp_assoc_t assoc_id);

Returns:

On success, it returns a new socket, which has the single association in it. On failure, it returns -1 and errno is set.

Errors:

EBADF
The socket descriptor, sd, is invalid.
ENOTSOCK
Can't branch off the association.

Classification:

SCTP

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

SCTP, sctp_bindx(), sctp_connectx(), sctp_freeladdrs(), sctp_freepaddrs(), sctp_getladdrs(), sctp_getpaddrs(), sctp_recvmsg(), sctp_sendmsg()


[Previous] [Contents] [Index] [Next]