Imported Upstream version 1.0.10
[platform/upstream/lksctp-tools.git] / man / sctp_send.3
1 .\" (C) Copyright Sridhar Samudrala IBM Corp. 2005.
2 .\"
3 .\" Permission is granted to distribute possibly modified copies
4 .\" of this manual provided the header is included verbatim,
5 .\" and in case of nontrivial modification author and date
6 .\" of the modification is added to the header.
7 .\"
8 .TH SCTP_SEND 3 2005-10-25 "Linux 2.6" "Linux Programmer's Manual"
9 .SH NAME
10 sctp_send \- Send a message from a SCTP socket. 
11 .SH SYNOPSIS
12 .nf
13 .B #include <sys/types.h>
14 .B #include <sys/socket.h>
15 .B #include <netinet/sctp.h>
16 .sp
17 .BI "int sctp_send(int " sd ", const void * " msg ", size_t " len ,
18 .BI "                 const struct sctp_sndrcvinfo *" sinfo ",
19 .BI "                 uint32_t " flags );
20 .fi
21 .SH DESCRIPTION
22 .BR sctp_send
23 is a wrapper library function that can be used to send a message from a socket
24 without the use of the CMSG header structures.
25 .I sd
26 is the socket descriptor from which the message pointed to by
27 .I msg
28 of length
29 .I len
30 is sent.
31 .I sinfo
32 is a pointer to a sctp_sndrcvinfo structure.  
33 .I flags
34 parameter is composed of a bitwise OR of the flags that can be be passed as
35 the 3rd argument of a standard sendmsg() call.
36 .SH "RETURN VALUE"
37 On success,
38 .BR sctp_sendmsg
39 returns the number of bytes sent or -1 if an error occurred.
40 .SH "SEE ALSO"
41 .BR sctp (7)
42 .BR sctp_bindx (3),
43 .BR sctp_recvmsg (3),
44 .BR sctp_peeloff (3),
45 .BR sctp_getpaddrs (3),
46 .BR sctp_getladdrs (3),
47 .BR sctp_opt_info (3),
48 .BR sctp_sendmsg (3)