1sctp_send(3SOCKET)         Sockets Library Functions        sctp_send(3SOCKET)
2
3
4

NAME

6       sctp_send - send message from an SCTP socket
7

SYNOPSIS

9       cc [ flag... ] file... -lsocket  -lnsl   -lsctp  [ library... ]
10       #include <sys/types.h>
11       #include <sys/socket.h>
12       #include <netinet/sctp.h>
13
14       ssize_t sctp_send(int s, const void *msg, size_t *len,
15            const struct sctp_sndrcvinfo *sinfo, int flags);
16
17

DESCRIPTION

19       The sctp_send() function sends messages from one-to-one and one-to-many
20       style SCTP endpoints. The following parameters can be set:
21
22       s      Socket created by socket(3SOCKET)
23
24
25       msg    Message to be sent
26
27
28       len    Size of the message to be sent in bytes
29
30
31
32       The caller completes the sinfo parameter with values  used  to  send  a
33       message.  Such values might include the stream number, payload protocol
34       identifier, time to live, and the SCTP message flag and context. For  a
35       one-to-many  socket,  the  association ID can be specified in the sinfo
36       parameter to send a message to the association represented in the ID.
37
38
39       Flags supported for sctp_send() are reserved for future use.
40

RETURN VALUES

42       Upon successful completion, the sctp_send() function returns the number
43       of bytes sent. The function returns -1 if an error occurs.
44

ERRORS

46       The sctp_send() function fails under the following conditions.
47
48       EBADF           The s argument is an invalid file descriptor.
49
50
51       ENOTSOCK        The s argument is not a socket.
52
53
54       EOPNOTSUPP      MSG_ABORT or MSG_EOF is set in the sinfo_flags field of
55                       sinfo for a one-to-one style SCTP socket.
56
57
58       EPIPE           The socket is shutting down  and  no  more  writes  are
59                       allowed.
60
61
62       EAGAIN          The  socket  is  non-blocking and the transmit queue is
63                       full.
64
65
66       ENOTCONN        There is no established association.
67
68
69       EINVAL          Control message length is incorrect.
70
71
72       EINVAL          Specified destination address does not  belong  to  the
73                       association.
74
75
76       EINVAL          The stream_no is outside the number of outbound streams
77                       supported by the association.
78
79
80       EAFNOSUPPORT    Address family of the specified destination address  is
81                       other than AF_INET or AF_INET6.
82
83

ATTRIBUTES

85       See attributes(5) for descriptions of the following attributes:
86
87
88
89
90       ┌─────────────────────────────┬─────────────────────────────┐
91       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
92       ├─────────────────────────────┼─────────────────────────────┤
93       │Interface Stability          │Evolving                     │
94       ├─────────────────────────────┼─────────────────────────────┤
95       │MT-Level                     │Safe                         │
96       └─────────────────────────────┴─────────────────────────────┘
97

SEE ALSO

99       accept(3SOCKET),  bind(3SOCKET),  connect(3SOCKET),  in.h(3HEAD),  lib‐
100       sctp(3LIB), listen(3SOCKET),  sctp_sendmsg(3SOCKET),  sendmsg(3SOCKET),
101       socket(3SOCKET), socket.h(3HEAD), sctp(7P)
102
103
104
105SunOS 5.11                        19 Mar 2004               sctp_send(3SOCKET)
Impressum