SCTP_PEELOFF(3) Linux Programmer's Manual SCTP_PEELOFF(3)NAME
sctp_peeloff - Branch off an association into a separate socket.
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>
int sctp_peeloff(int sd, sctp_assoc_t assoc_id);
DESCRIPTION
sctp_peeloff branches off an existing association assoc_id on a one-to-many style socket sd into a separate socket. The new socket is a
one-to-one style socket.
This is particularly desirable when, for instance, the application wishes to have a number of sporadic message senders/receivers remain
under the original one-to-many style socket, but branch off those assocations carrying high volume data traffic into their own separate
socket descriptors.
RETURN VALUE
On success, the new socket descriptor representing the branched-off asociation is returned. On error, -1 is returned, and errno is set
appropriately.
ERRORS
EBADF sd is not a valid descriptor.
EINVAL The assoc id passed is invalid or if the socket is a one-to-one style socket.
ENOTSOCK
Argument is a descriptor for a file, not a socket.
SEE ALSO sctp(7)sctp_bindx(3), sctp_connectx(3), sctp_sendmsg(3), sctp_send(3), sctp_recvmsg(3), sctp_getpaddrs(3), sctp_getladdrs(3),
sctp_opt_info(3),
Linux 2.6 2005-10-25 SCTP_PEELOFF(3)
Check Out this Related Man Page
SCTP_GETPADDRS(3) Linux Programmer's Manual SCTP_GETPADDRS(3)NAME
sctp_getpaddrs - Returns all peer addresses in an association.
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/sctp.h>
int sctp_getpaddrs(int sd, sctp_assoc_t assoc_id,
struct sockaddr **addrs);
void sctp_freepaddrs(struct sockaddr *addrs);
DESCRIPTION
sctp_getpaddrs returns all peer addresses in an association. On return, addrs will point to a dynamically allocated packed array of sock-
addr structures of the appropriate type for each address. The caller should use sctp_freepaddrs to free the memory. Note that the in/out
parameter addrs must not be NULL.
If sd is an IPv4 socket, the addresses returned will be all IPv4 addresses. If sd is an IPv6 socket, the addresses returned can be a mix of
IPv4 or IPv6 addresses.
For one-to-many style sockets, id specifies the association to query. For one-to-one style sockets, id is ignored.
sctp_freepaddrs frees all the resources allocated by sctp_getpaddrs.
RETURN VALUE
On success, sctp_getpaddrs returns the number of peer addresses in the association. If there is no association on this socket, 0 is
returned and the value of *addrs is undefined. On error, sctp_getpaddrs returns -1 and the value of *addrs is undefined.
SEE ALSO sctp(7)sctp_bindx(3), sctp_connectx(3), sctp_sendmsg(3), sctp_send(3), sctp_recvmsg(3), sctp_peeloff(3), sctp_getladdrs(3),
sctp_opt_info(3),
Linux 2.6 2005-10-25 SCTP_GETPADDRS(3)
Excuse me . I'm a beginner . In windows , MFC can be used , but how to do in Unix ? And does unix support c++like VC++ ? How can I get developing tools in Unix ? (7 Replies)
Is there any way to get the file descriptor statistics of a socket file descriptor? I know that the fstat, stat system calls are for this purpose, but I want to know it there any way to get socket connection statistics for a file descriptor(like socket flags, connection type etc).
Does /proc... (3 Replies)
Hi Friends,
I have written a program which will listener for more than 1000 requests per second from a single socket descriptor and then it will process those requestes. Its taking X amount of time. Now i want to reduce that time. Will I can write multiple threads to receive the... (2 Replies)
helo,
i m porting HP-UX socket application to Linux SSL-socket application.
I have use htonl() in HP-UX.
so when i use it in Linux, data transf is not done and application become soem time crashed.
now when i remove htonl() in linux, then i got data but it will not proper order or some data may... (1 Reply)
Hi,
I want to validate that a file is a socket file on Linux. I know I can do this using the S_ISSOCK macro, but I am not sure how to get the file descriptor for the socket file.
For example, I know that /tmp/mapping-foo is a socket file. In Python I can do something like this:
>>> import... (2 Replies)
Dear Experts,
i am compiling my code in suse 4.1 which is compiling fine,
but at runtime it is showing me for socket programming error no 88
as i searched in errno.h it is telling me socket operation on non socket,
what is the meaning of this , how to deal with this error , please... (1 Reply)
Hi All
I have a separate thread ListenerThread having a socket listening to info broadcasted by some remote server. This is created in my main thread.
Because of requirements, once the separate thread is started I need to avoid any blocking function on the main thread. Once it comes to the... (2 Replies)
Sorry if I posted 2 separate questions.
I'm currently doing socket programming on my current task. As you can see below in the client side. I've tried to do a loop so I will be able to get prompt for input over and over again.
This is the code.
do{
printf("Please your name > ");... (10 Replies)