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

NAME

6       sctp_recvmsg - receive 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_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
15            socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags);
16
17

DESCRIPTION

19       The  sctp_recvmsg()  function receives a message from the SCTP endpoint
20       s.
21
22
23       In addition to specifying the message buffer msg and the length len  of
24       the buffer, the following parameters can be set:
25
26       from         Pointer to an address, filled in with the sender's address
27
28
29       fromlen      Size of the buffer associated with the from parameter
30
31
32       sinfo        Pointer  to  an  sctp_sndrcvinfo structure, filled in upon
33                    the receipt of the message
34
35
36       msg_flags    Message  flags  such  as   MSG_CTRUNC,   MSG_NOTIFICATION,
37                    MSG_EOR
38
39
40
41       The  sinfo  parameter  is  filled  in  only when the caller has enabled
42       sctp_data_io_events by calling  setsockopt()  with  the  socket  option
43       SCTP_EVENTS.
44

RETURN VALUES

46       Upon  successful  completion,  the  sctp_recvmsg() function returns the
47       number of bytes received. The function returns -1 if an error occurs.
48

ERRORS

50       The sctp_recvmsg() function fails under the following conditions.
51
52       EBADF         The s argument is an invalid file descriptor.
53
54
55       ENOTSOCK      The s argument is not a socket.
56
57
58       EOPNOTSUPP    MSG_OOB is set as a flag.
59
60
61       ENOTCONN      There is no established association.
62
63

ATTRIBUTES

65       See attributes(5) for descriptions of the following attributes:
66
67
68
69
70       ┌─────────────────────────────┬─────────────────────────────┐
71       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
72       ├─────────────────────────────┼─────────────────────────────┤
73       │Interface Stability          │Evolving                     │
74       ├─────────────────────────────┼─────────────────────────────┤
75       │MT-Level                     │Safe                         │
76       └─────────────────────────────┴─────────────────────────────┘
77

SEE ALSO

79       accept(3SOCKET),  bind(3SOCKET),  connect(3SOCKET),  in.h(3HEAD),  lib‐
80       sctp(3LIB),  listen(3SOCKET), recvmsg(3SOCKET), sctp_opt_info(3SOCKET),
81       setsockopt(3SOCKET), socket(3SOCKET), socket.h(3HEAD), sctp(7P)
82
83
84
85SunOS 5.11                        14 Jul 2004            sctp_recvmsg(3SOCKET)
Impressum