Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/sys/send.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 | .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd August 19, 2018 | .Dd January 4, 2019 | ||||
.Dt SEND 2 | .Dt SEND 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm send , | .Nm send , | ||||
.Nm sendto , | .Nm sendto , | ||||
.Nm sendmsg , | .Nm sendmsg , | ||||
.Nm sendmmsg | .Nm sendmmsg | ||||
.Nd send message(s) from a socket | .Nd send message(s) from a socket | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
send more data. | send more data. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Fa flags | .Fa flags | ||||
argument may include one or more of the following: | argument may include one or more of the following: | ||||
.Bd -literal | .Bd -literal | ||||
#define MSG_OOB 0x00001 /* process out-of-band data */ | #define MSG_OOB 0x00001 /* process out-of-band data */ | ||||
#define MSG_DONTROUTE 0x00004 /* bypass routing, use direct interface */ | #define MSG_DONTROUTE 0x00004 /* bypass routing, use direct interface */ | ||||
#define MSG_EOR 0x00008 /* data completes record */ | #define MSG_EOR 0x00008 /* data completes record */ | ||||
#define MSG_DONTWAIT 0x00080 /* do not block */ | |||||
#define MSG_EOF 0x00100 /* data completes transaction */ | #define MSG_EOF 0x00100 /* data completes transaction */ | ||||
#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ | #define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ | ||||
.Ed | .Ed | ||||
.Pp | .Pp | ||||
The flag | The flag | ||||
.Dv MSG_OOB | .Dv MSG_OOB | ||||
is used to send | is used to send | ||||
.Dq out-of-band | .Dq out-of-band | ||||
data on sockets that support this notion (e.g.\& | data on sockets that support this notion (e.g.\& | ||||
.Dv SOCK_STREAM ) ; | .Dv SOCK_STREAM ) ; | ||||
the underlying protocol must also support | the underlying protocol must also support | ||||
.Dq out-of-band | .Dq out-of-band | ||||
data. | data. | ||||
.Dv MSG_EOR | .Dv MSG_EOR | ||||
is used to indicate a record mark for protocols which support the | is used to indicate a record mark for protocols which support the | ||||
concept. | concept. | ||||
The | |||||
.Dv MSG_DONTWAIT | |||||
flag request the call to return when it would block otherwise. | |||||
.Dv MSG_EOF | .Dv MSG_EOF | ||||
requests that the sender side of a socket be shut down, and that an | requests that the sender side of a socket be shut down, and that an | ||||
appropriate indication be sent at the end of the specified data; | appropriate indication be sent at the end of the specified data; | ||||
this flag is only implemented for | this flag is only implemented for | ||||
.Dv SOCK_STREAM | .Dv SOCK_STREAM | ||||
sockets in the | sockets in the | ||||
.Dv PF_INET | .Dv PF_INET | ||||
protocol family. | protocol family. | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
.Fa s | .Fa s | ||||
is not a socket. | is not a socket. | ||||
.It Bq Er EFAULT | .It Bq Er EFAULT | ||||
An invalid user space address was specified for an argument. | An invalid user space address was specified for an argument. | ||||
.It Bq Er EMSGSIZE | .It Bq Er EMSGSIZE | ||||
The socket requires that message be sent atomically, | The socket requires that message be sent atomically, | ||||
and the size of the message to be sent made this impossible. | and the size of the message to be sent made this impossible. | ||||
.It Bq Er EAGAIN | .It Bq Er EAGAIN | ||||
The socket is marked non-blocking and the requested operation | The socket is marked non-blocking, or | ||||
would block. | .Dv MSG_DONTWAIT | ||||
is specified, and the requested operation would block. | |||||
.It Bq Er ENOBUFS | .It Bq Er ENOBUFS | ||||
The system was unable to allocate an internal buffer. | The system was unable to allocate an internal buffer. | ||||
The operation may succeed when buffers become available. | The operation may succeed when buffers become available. | ||||
.It Bq Er ENOBUFS | .It Bq Er ENOBUFS | ||||
The output queue for a network interface was full. | The output queue for a network interface was full. | ||||
This generally indicates that the interface has stopped sending, | This generally indicates that the interface has stopped sending, | ||||
but may be caused by transient congestion. | but may be caused by transient congestion. | ||||
.It Bq Er EHOSTUNREACH | .It Bq Er EHOSTUNREACH | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |