Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
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:
| 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]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)