Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sctp_peeloff(3) [hpux man page]

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)
Man Page

13 More Discussions You Might Find Interesting

1. Programming

How can I program socket in unix?

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)
Discussion started by: sanjohn
7 Replies

2. Shell Programming and Scripting

socket scripting

Need a script for a socket to communicate with federal express? Help (3 Replies)
Discussion started by: lgolonka
3 Replies

3. UNIX for Advanced & Expert Users

Getting Socket statistics

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)
Discussion started by: comp_wizard07
3 Replies

4. IP Networking

Can we write a multiple thread to receive from a single socket file descriptor

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)
Discussion started by: pa.chidhambaram
2 Replies

5. Linux

when porting from HP-UX to Linux

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)
Discussion started by: amitpansuria
1 Replies

6. Programming

Get the file descriptor of a socket file. C vs Python.

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)
Discussion started by: goon12
2 Replies

7. SuSE

Error with socket operation on non-socket

(1 Reply)
Discussion started by: vin_pll
1 Replies

8. Programming

Error with socket operation on non-socket

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)
Discussion started by: vin_pll
1 Replies

9. Solaris

Killing a thread having a listener socket

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)
Discussion started by: manustone
2 Replies

10. Programming

creating socket()

deleted (7 Replies)
Discussion started by: satish@123
7 Replies

11. Programming

socket programming

how to include socket.h in visual studio 2005.. (2 Replies)
Discussion started by: asd123
2 Replies

12. Programming

Looping problems socket programming in C

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)
Discussion started by: aLHaNz
10 Replies

13. Shell Programming and Scripting

How to easily identify socket given a PID on Linux?

(2 Replies)
Discussion started by: mohtashims
2 Replies