From 5351669eb45829056821da9da1b7c5b300d85c6f Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Wed, 26 Oct 2016 14:50:52 +0300 Subject: [PATCH] man: replace old socket-related 3socket/3xnet pages with shiny man2 versions --- Makefile | 1 + usr/src/man/man3socket/Makefile | 32 +- usr/src/man/man3socket/accept.3socket | 258 ---------- usr/src/man/man3socket/bind.3socket | 198 -------- usr/src/man/man3socket/connect.3socket | 471 ------------------ usr/src/man/man3socket/getpeername.3socket | 98 ---- usr/src/man/man3socket/getsockname.3socket | 87 ---- usr/src/man/man3socket/getsockopt.3socket | 531 --------------------- usr/src/man/man3socket/listen.3socket | 100 ---- usr/src/man/man3socket/recv.3socket | 291 ----------- usr/src/man/man3socket/send.3socket | 280 ----------- usr/src/man/man3socket/shutdown.3socket | 107 ----- usr/src/man/man3socket/socket.3socket | 327 ------------- usr/src/man/man3socket/socketpair.3socket | 123 ----- usr/src/man/man3xnet/Makefile | 22 +- usr/src/man/man3xnet/accept.3xnet | 262 ---------- usr/src/man/man3xnet/bind.3xnet | 316 ------------ usr/src/man/man3xnet/connect.3xnet | 409 ---------------- usr/src/man/man3xnet/getpeername.3xnet | 143 ------ usr/src/man/man3xnet/getsockname.3xnet | 135 ------ usr/src/man/man3xnet/getsockopt.3xnet | 375 --------------- usr/src/man/man3xnet/listen.3xnet | 156 ------ usr/src/man/man3xnet/recv.3xnet | 299 ------------ usr/src/man/man3xnet/recvfrom.3xnet | 337 ------------- usr/src/man/man3xnet/recvmsg.3xnet | 389 --------------- usr/src/man/man3xnet/send.3xnet | 307 ------------ usr/src/man/man3xnet/sendmsg.3xnet | 438 ----------------- usr/src/man/man3xnet/sendto.3xnet | 448 ----------------- usr/src/man/man3xnet/setsockopt.3xnet | 343 ------------- usr/src/man/man3xnet/shutdown.3xnet | 166 ------- usr/src/man/man3xnet/sockatmark.3xnet | 104 ---- usr/src/man/man3xnet/socket.3xnet | 277 ----------- usr/src/man/man3xnet/socketpair.3xnet | 252 ---------- usr/src/pkg/manifests/system-kernel.man2.inc | 18 + usr/src/pkg/manifests/system-library.man3.inc | 6 + .../pkg/manifests/system-library.man3socket.inc | 19 - usr/src/pkg/manifests/system-library.man3xnet.inc | 18 - 37 files changed, 29 insertions(+), 8114 deletions(-) delete mode 100644 usr/src/man/man3socket/accept.3socket delete mode 100644 usr/src/man/man3socket/bind.3socket delete mode 100644 usr/src/man/man3socket/connect.3socket delete mode 100644 usr/src/man/man3socket/getpeername.3socket delete mode 100644 usr/src/man/man3socket/getsockname.3socket delete mode 100644 usr/src/man/man3socket/getsockopt.3socket delete mode 100644 usr/src/man/man3socket/listen.3socket delete mode 100644 usr/src/man/man3socket/recv.3socket delete mode 100644 usr/src/man/man3socket/send.3socket delete mode 100644 usr/src/man/man3socket/shutdown.3socket delete mode 100644 usr/src/man/man3socket/socket.3socket delete mode 100644 usr/src/man/man3socket/socketpair.3socket delete mode 100644 usr/src/man/man3xnet/accept.3xnet delete mode 100644 usr/src/man/man3xnet/bind.3xnet delete mode 100644 usr/src/man/man3xnet/connect.3xnet delete mode 100644 usr/src/man/man3xnet/getpeername.3xnet delete mode 100644 usr/src/man/man3xnet/getsockname.3xnet delete mode 100644 usr/src/man/man3xnet/getsockopt.3xnet delete mode 100644 usr/src/man/man3xnet/listen.3xnet delete mode 100644 usr/src/man/man3xnet/recv.3xnet delete mode 100644 usr/src/man/man3xnet/recvfrom.3xnet delete mode 100644 usr/src/man/man3xnet/recvmsg.3xnet delete mode 100644 usr/src/man/man3xnet/send.3xnet delete mode 100644 usr/src/man/man3xnet/sendmsg.3xnet delete mode 100644 usr/src/man/man3xnet/sendto.3xnet delete mode 100644 usr/src/man/man3xnet/setsockopt.3xnet delete mode 100644 usr/src/man/man3xnet/shutdown.3xnet delete mode 100644 usr/src/man/man3xnet/sockatmark.3xnet delete mode 100644 usr/src/man/man3xnet/socket.3xnet delete mode 100644 usr/src/man/man3xnet/socketpair.3xnet diff --git a/Makefile b/Makefile index 4402620ad2..6ad8135da8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ SUBDIR = bin \ + lib \ kernel .include diff --git a/usr/src/man/man3socket/Makefile b/usr/src/man/man3socket/Makefile index 5174020548..3431633725 100644 --- a/usr/src/man/man3socket/Makefile +++ b/usr/src/man/man3socket/Makefile @@ -19,29 +19,21 @@ include $(SRC)/Makefile.master MANSECT= 3socket -MANFILES= accept.3socket \ - bind.3socket \ - byteorder.3socket \ - connect.3socket \ +MANFILES= byteorder.3socket \ ethers.3socket \ getaddrinfo.3socket \ getifaddrs.3socket \ getipnodebyname.3socket \ getnetbyname.3socket \ - getpeername.3socket \ getprotobyname.3socket \ getservbyname.3socket \ - getsockname.3socket \ - getsockopt.3socket \ getsourcefilter.3socket \ icmp6_filter.3socket \ if_nametoindex.3socket \ inet.3socket \ inet6_opt.3socket \ inet6_rth.3socket \ - listen.3socket \ rcmd.3socket \ - recv.3socket \ rexec.3socket \ sctp_bindx.3socket \ sctp_getladdrs.3socket \ @@ -51,15 +43,10 @@ MANFILES= accept.3socket \ sctp_recvmsg.3socket \ sctp_send.3socket \ sctp_sendmsg.3socket \ - send.3socket \ sockaddr.3socket \ - shutdown.3socket \ - socket.3socket \ - socketpair.3socket \ spray.3socket -MANLINKS= accept4.3socket \ - endnetent.3socket \ +MANLINKS= endnetent.3socket \ endprotoent.3socket \ endservent.3socket \ ether_aton.3socket \ @@ -124,21 +111,16 @@ MANLINKS= accept4.3socket \ ntohll.3socket \ ntohs.3socket \ rcmd_af.3socket \ - recvfrom.3socket \ - recvmsg.3socket \ rexec_af.3socket \ rresvport.3socket \ rresvport_af.3socket \ ruserok.3socket \ sctp_freeladdrs.3socket \ sctp_freepaddrs.3socket \ - sendmsg.3socket \ - sendto.3socket \ setipv4sourcefilter.3socket \ setnetent.3socket \ setprotoent.3socket \ setservent.3socket \ - setsockopt.3socket \ setsourcefilter.3socket \ sockaddr_dl.3socket \ sockaddr_in.3socket \ @@ -147,8 +129,6 @@ MANLINKS= accept4.3socket \ sockaddr_storage.3socket \ sockaddr_un.3socket -accept4.3socket := LINKSRC = accept.3socket - htonl.3socket := LINKSRC = byteorder.3socket htonll.3socket := LINKSRC = byteorder.3socket htons.3socket := LINKSRC = byteorder.3socket @@ -197,8 +177,6 @@ getservent.3socket := LINKSRC = getservbyname.3socket getservent_r.3socket := LINKSRC = getservbyname.3socket setservent.3socket := LINKSRC = getservbyname.3socket -setsockopt.3socket := LINKSRC = getsockopt.3socket - getipv4sourcefilter.3socket := LINKSRC = getsourcefilter.3socket setipv4sourcefilter.3socket := LINKSRC = getsourcefilter.3socket setsourcefilter.3socket := LINKSRC = getsourcefilter.3socket @@ -238,18 +216,12 @@ rresvport.3socket := LINKSRC = rcmd.3socket rresvport_af.3socket := LINKSRC = rcmd.3socket ruserok.3socket := LINKSRC = rcmd.3socket -recvfrom.3socket := LINKSRC = recv.3socket -recvmsg.3socket := LINKSRC = recv.3socket - rexec_af.3socket := LINKSRC = rexec.3socket sctp_freeladdrs.3socket := LINKSRC = sctp_getladdrs.3socket sctp_freepaddrs.3socket := LINKSRC = sctp_getpaddrs.3socket -sendmsg.3socket := LINKSRC = send.3socket -sendto.3socket := LINKSRC = send.3socket - sockaddr_dl.3socket := LINKSRC = sockaddr.3socket sockaddr_in.3socket := LINKSRC = sockaddr.3socket sockaddr_in6.3socket := LINKSRC = sockaddr.3socket diff --git a/usr/src/man/man3socket/accept.3socket b/usr/src/man/man3socket/accept.3socket deleted file mode 100644 index 256ce09db4..0000000000 --- a/usr/src/man/man3socket/accept.3socket +++ /dev/null @@ -1,258 +0,0 @@ -'\" te -.\" Copyright 1989 AT&T -.\" Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved -.\" Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH ACCEPT 3SOCKET "Apr 19, 2013" -.SH NAME -accept \- accept a connection on a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - -\fBint\fR \fBaccept\fR(\fBint\fR \fIs\fR, \fBstruct sockaddr *\fR\fIaddr\fR, \fBsocklen_t *\fR\fIaddrlen\fR); - -\fBint\fR \fBaccept4\fR(\fBint\fR \fIs\fR, \fBstruct sockaddr *\fR\fIaddr\fR, \fBsocklen_t *\fR\fIaddrlen\fR, - \fBint\fR \fIflags\fR); -.fi - -.SH DESCRIPTION -.LP -The argument \fIs\fR is a socket that has been created with -\fBsocket\fR(3SOCKET) and bound to an address with \fBbind\fR(3SOCKET), and -that is listening for connections after a call to \fBlisten\fR(3SOCKET). The -\fBaccept()\fR function extracts the first connection on the queue of pending -connections, creates a new socket with the properties of \fIs\fR, and allocates -a new file descriptor, \fIns\fR, for the socket. If no pending connections are -present on the queue and the socket is not marked as non-blocking, -\fBaccept()\fR blocks the caller until a connection is present. If the socket -is marked as non-blocking and no pending connections are present on the queue, -\fBaccept()\fR returns an error as described below. The \fBaccept()\fR -function uses the \fBnetconfig\fR(4) file to determine the \fBSTREAMS\fR device -file name associated with \fIs\fR. This is the device on which the connect -indication will be accepted. The accepted socket, \fIns\fR, is used to read and -write data to and from the socket that connected to \fIns\fR. It is not used to -accept more connections. The original socket (\fIs\fR) remains open for -accepting further connections. -.sp -.LP -The argument \fIaddr\fR is a result parameter that is filled in with the -address of the connecting entity as it is known to the communications layer. -The exact format of the \fIaddr\fR parameter is determined by the domain in -which the communication occurs. -.sp -.LP -The argument \fIaddrlen\fR is a value-result parameter. Initially, it contains -the amount of space pointed to by \fIaddr\fR; on return it contains the length -in bytes of the address returned. -.sp -.LP -The \fBaccept()\fR function is used with connection-based socket types, -currently with \fBSOCK_STREAM\fR. -.sp -.LP -The \fBaccept4()\fR function allows flags that control the behavior of a -successfully accepted socket. If \fIflags\fR is 0, \fBaccept4()\fR acts -identically to \fBaccept()\fR. Values for \fIflags\fR are constructed by -a bitwise-inclusive-OR of flags from the following list, defined in -. -.sp -.ne 2 -.na -\fB\fBSOCK_CLOEXEC\fR\fR -.ad -.RS 12n -The accepted socket will have the FD_CLOEXEC flag set as if \fBfcntl()\fR -was called on it. This flag is set before the socket is passed to the -caller thus avoiding the race condition between \fBaccept()\fR and -\fBfcntl()\fR. See, \fBO_CLOEXEC\fR in \fBopen(2)\fR for more details. -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_NDELAY\fR\fR -.ad -.RS 12n -The accepted socket will have the \fBO_NDELAY\fR flag set as if \fBfcntl()\fR -was called on it. This sets the socket into non-blocking mode. See -\fBO_NDELAY\fR in \fBfcntl.h(3HEAD)\fR for more details. -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_NONBLOCK\fR\fR -.ad -.RS 12n -The accepted socket will have the \fBO_NONBLOCK\fR flag set as if -\fBfcntl()\fR was called on it. This sets the socket into non-blocking mode -(POSIX; see \fBstandards(5)\fR). See \fBO_NONBLOCK\fR in \fBfcntl.h(3HEAD)\fR -for more details. -.RE -.sp -.LP -It is possible to \fBselect\fR(3C) or \fBpoll\fR(2) a socket for the purpose of -an \fBaccept()\fR by selecting or polling it for a read. However, this will -only indicate when a connect indication is pending; it is still necessary to -call \fBaccept()\fR. -.SH RETURN VALUES -.LP -The \fBaccept()\fR function returns \fB\(mi1\fR on error. If it succeeds, it -returns a non-negative integer that is a descriptor for the accepted socket. -.SH ERRORS -.LP -\fBaccept()\fR and \fBaccept4()\fR will fail if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -The descriptor is invalid. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNABORTED\fR\fR -.ad -.RS 16n -The remote side aborted the connection before the \fBaccept()\fR operation -completed. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 16n -The \fIaddr\fR parameter or the \fIaddrlen\fR parameter is invalid. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 16n -The \fBaccept()\fR attempt was interrupted by the delivery of a signal. -.RE - -.sp -.ne 2 -.na -\fB\fBEMFILE\fR\fR -.ad -.RS 16n -The per-process descriptor table is full. -.RE - -.sp -.ne 2 -.na -\fB\fBENODEV\fR\fR -.ad -.RS 16n -The protocol family and type corresponding to \fIs\fR could not be found in -the \fBnetconfig\fR file. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 16n -There was insufficient user memory available to complete the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 16n -There were insufficient \fBSTREAMS\fR resources available to complete the -operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -The descriptor does not reference a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 16n -The referenced socket is not of type \fBSOCK_STREAM\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTO\fR\fR -.ad -.RS 16n -A protocol error has occurred; for example, the \fBSTREAMS\fR protocol stack -has not been initialized or the connection has already been released. -.RE - -.sp -.ne 2 -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 16n -The socket is marked as non-blocking and no connections are present to be -accepted. -.RE - -.sp -.LP -\fBAdditionally, \fBaccept4()\fR will fail if: -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The \fIflags\fR value is invalid. The \fIflags\fR argument can only be the -bitwise inclusive-OR of \fBSOCK_CLOEXEC\fR, \fBSOCK_NONBLOCK\fR, and -\fBSOCK_NDELAY\fR. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.LP -\fBpoll\fR(2), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET), -\fBlisten\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), \fBselect\fR(3C), -\fBsocket.h\fR(3HEAD), \fBsocket\fR(3SOCKET), \fBnetconfig\fR(4), -\fBattributes\fR(5), \fBfcntl.h(3HEAD)\fR, \fBfcntl(2)\fR, \fBstandards(5)\fR diff --git a/usr/src/man/man3socket/bind.3socket b/usr/src/man/man3socket/bind.3socket deleted file mode 100644 index ff557cfbc5..0000000000 --- a/usr/src/man/man3socket/bind.3socket +++ /dev/null @@ -1,198 +0,0 @@ -'\" te -.\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved -.\" Copyright 1989 AT&T -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with -.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH BIND 3SOCKET "May 11, 2009" -.SH NAME -bind \- bind a name to a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - - - -\fBint\fR \fBbind\fR(\fBint\fR \fIs\fR, \fBconst struct sockaddr *\fR\fIname\fR, \fBint\fR \fInamelen\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBbind()\fR function assigns a name to an unnamed socket. When a socket is -created with \fBsocket\fR(3SOCKET), it exists in a name space (address family) -but has no name assigned. The \fBbind()\fR function requests that the name -pointed to by \fIname\fR be assigned to the socket. -.SH RETURN VALUES -.LP -Upon successful completion \fB0\fR is returned. Otherwise, \fB\(mi1\fR is -returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBbind()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 17n -The requested address is protected, and \fB{PRIV_NET_PRIVADDR}\fR is not -asserted in the effective set of the current process. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRINUSE\fR\fR -.ad -.RS 17n -The specified address is already in use. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRNOTAVAIL\fR\fR -.ad -.RS 17n -The specified address is not available on the local machine. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 17n -\fIs\fR is not a valid descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 17n -\fInamelen\fR is not the size of a valid address for the specified address -family. -.sp -The socket is already bound to an address. -.sp -Socket options are inconsistent with port attributes. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 17n -There were insufficient \fBSTREAMS\fR resources for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 17n -\fIs\fR is a descriptor for a file, not a socket. -.RE - -.sp -.LP -The following errors are specific to binding names in the UNIX domain: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 11n -Search permission is denied for a component of the path prefix of the pathname -in \fIname\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 11n -An I/O error occurred while making the directory entry or allocating the inode. -.RE - -.sp -.ne 2 -.na -\fB\fBEISDIR\fR\fR -.ad -.RS 11n -A null pathname was specified. -.RE - -.sp -.ne 2 -.na -\fB\fBELOOP\fR\fR -.ad -.RS 11n -Too many symbolic links were encountered in translating the pathname in -\fIname\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 11n -A component of the path prefix of the pathname in \fIname\fR does not exist. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTDIR\fR\fR -.ad -.RS 11n -A component of the path prefix of the pathname in \fIname\fR is not a -directory. -.RE - -.sp -.ne 2 -.na -\fB\fBEROFS\fR\fR -.ad -.RS 11n -The inode would reside on a read-only file system. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.LP -\fBunlink\fR(2), \fBsocket\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), -\fBattributes\fR(5), \fBprivileges\fR(5), \fBsocket.h\fR(3HEAD) -.SH NOTES -.LP -Binding a name in the UNIX domain creates a socket in the file system that must -be deleted by the caller when it is no longer needed by using \fBunlink\fR(2). -.sp -.LP -The rules used in name binding vary between communication domains. diff --git a/usr/src/man/man3socket/connect.3socket b/usr/src/man/man3socket/connect.3socket deleted file mode 100644 index 26c8f223aa..0000000000 --- a/usr/src/man/man3socket/connect.3socket +++ /dev/null @@ -1,471 +0,0 @@ -'\" te -.\" Copyright (C) 2005, Sun Microsystems, Inc. -.\" All Rights Reserved -.\" Copyright (c) 2014, Joyent, Inc. -.\" Copyright 1989 AT&T All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH CONNECT 3SOCKET "Nov 25, 2014" -.SH NAME -connect \- initiate a connection on a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - - - -\fBint\fR \fBconnect\fR(\fBint\fR \fIs\fR, \fBconst struct sockaddr *\fR\fIname\fR, \fBint\fR \fInamelen\fR); -.fi - -.SH DESCRIPTION -.LP -The parameter \fIs\fR is a socket. If it is of type \fBSOCK_DGRAM\fR, -\fBconnect()\fR specifies the peer with which the socket is to be associated. -This address is the address to which datagrams are to be sent if a receiver is -not explicitly designated. This address is the only address from which -datagrams are to be received. If the socket \fIs\fR is of type -\fBSOCK_STREAM\fR, \fBconnect()\fR attempts to make a connection to another -socket. The other socket is specified by \fIname\fR. \fIname\fR is an address -in the communication space of the socket. Each communication space interprets -the \fIname\fR parameter in its own way. If \fIs\fR is not bound, then \fIs\fR -will be bound to an address selected by the underlying transport provider. -Generally, stream sockets can successfully \fBconnect()\fR only once. Datagram -sockets can use \fBconnect()\fR multiple times to change their association. -Datagram sockets can dissolve the association by connecting to a null address. -.SS Non-blocking Sockets -When a socket is created, it is by default a \fBblocking\fR socket. A socket may -be configured to be \fBnon-blocking\fR either at socket creation time or through -the use of \fBfcntl\fR(2). When a socket is set to be \fBnon-blocking\fR, a call -to connect initiates an asynchronous connection. If the connection cannot be -completed without blocking, such as when making a TCP connection to a remote -server, then the connection attempt is made in the background and \fBconnect\fR -returns -1 and errno is set to \fBEINPROGRESS\fR. -.LP -Applications can obtain the state of this connection attempt by polling the -socket's file descriptor for \fBPOLLOUT\fR. The event ports facility is the -preferred means of polling on the file descriptor, see \fBport_create\fR(3C) and -\fBport_get\fR(3C) for more information on event ports; however, applications -may also use traditional portable routines like \fBpoll\fR(2) and -\fBselect\fR(3C). -.LP -When an asynchronous connection has completed, the application must call -\fBgetsockopt\fR(3SOCKET) using the macro \fBSOL_SOCKET\fR as the \fIlevel\fR -argument and the macro \fBSO_ERROR\fR as the value of the \fIoption\fR argument. -If the value of the \fBSO_ERROR\fR socket option is zero, then the -connect was successfully established. Otherwise, the connection could not be -established and the value is the corresponding error code that would be commonly -found in \fBerrno\fR. -.LP -Even when a socket is in \fBnon-blocking\fR mode, a call to \fBconnect\fR may -fail synchronously. If any error other \fBEINPROGRESS\fR or \fBEINTR\fR occurs, -then there is no need for the application to poll for asynchronous completion. -Similarly, if a call to \fBconnect\fR returns successfully, then the socket -connection will be established and there is no need to poll for completion. -.SH EXAMPLES -.LP -\fBExample 1\fR Performing an asynchronous connection -.sp -.LP -The following sample C program shows how to create and connect to a remote host -using TCP. -.sp -.in +2 -.nf -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int -main(int argc, char *argv[]) -{ - char *eptr; - long port; - int sock, ret, eport; - struct sockaddr_in6 sin6; - - if (argc != 3) { - fprintf(stderr, "connect: \\n"); - return (1); - } - - bzero(&sin6, sizeof (struct sockaddr_in6)); - sin6.sin6_family = AF_INET6; - - /* - * Try to parse as an IPv6 address and then try v4. - */ - ret = inet_pton(AF_INET6, argv[1], &sin6.sin6_addr); - if (ret == -1) { - perror("inet_pton"); - return (1); - } else if (ret == 0) { - struct in_addr v4; - ret = inet_pton(AF_INET, argv[1], &v4); - if (ret == -1) { - perror("inet_pton"); - return (1); - } else if (ret == 0) { - fprintf(stderr, "connect: %s is not a valid " - "IPv4 or IPv6 address\\n", argv[1]); - return (1); - } - /* N.B. Not a portable macro */ - IN6_INADDR_TO_V4MAPPED(&v4, &sin6.sin6_addr); - } - - errno = 0; - port = strtol(argv[2], &eptr, 10); - if (errno != 0 || *eptr != '\0') { - fprintf(stderr, "failed to parse port %s\\n", argv[2]); - return (1); - } - if (port <= 0 || port > UINT16_MAX) { - fprintf(stderr, "invalid port: %ld\\n", port); - return (1); - } - sin6.sin6_port = htons(port); - - sock = socket(AF_INET6, SOCK_STREAM | SOCK_NONBLOCK, 0); - if (sock < 0) { - perror("socket"); - return (1); - } - - eport = port_create(); - if (eport < 0) { - perror("port_create"); - (void) close(sock); - return (1); - } - - ret = connect(sock, (struct sockaddr *)&sin6, - sizeof (struct sockaddr_in6)); - if (ret != 0 && errno != EINPROGRESS && errno != EINTR) { - perror("connect"); - (void) close(sock); - (void) close(eport); - return (1); - } - - if (ret != 0) { - port_event_t pe; - int err; - socklen_t sz = sizeof (err); - if (port_associate(eport, PORT_SOURCE_FD, sock, POLLOUT, - NULL) != 0) { - perror("port_associate"); - (void) close(sock); - (void) close(eport); - return (1); - } - if (port_get(eport, &pe, NULL) != 0) { - perror("port_get"); - (void) close(sock); - (void) close(eport); - return (1); - } - assert(pe.portev_source == PORT_SOURCE_FD); - assert(pe.portev_object == (uintptr_t)sock); - if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &err, &sz) != 0) { - perror("getsockopt"); - (void) close(sock); - (void) close(eport); - return (1); - } - if (err != 0) { - /* Asynch connect failed */ - fprintf(stderr, "asnchronous connect: %s\\n", - strerror(err)); - (void) close(sock); - (void) close(eport); - return (1); - } - } - - /* Read and write to the socket and then clean up */ - - return (0); -} -.fi -.in -2 -.SH RETURN VALUES -.LP -If the connection or binding succeeds, \fB0\fR is returned. Otherwise, -\fB\(mi1\fR is returned and sets \fBerrno\fR to indicate the error. -.SH ERRORS -.LP -The call fails if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 17n -Search permission is denied for a component of the path prefix of the pathname -in \fIname\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRINUSE\fR\fR -.ad -.RS 17n -The address is already in use. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRNOTAVAIL\fR\fR -.ad -.RS 17n -The specified address is not available on the remote machine. -.RE - -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 17n -Addresses in the specified address family cannot be used with this socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEALREADY\fR\fR -.ad -.RS 17n -The socket is non-blocking, and a previous connection attempt has not yet been -completed. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 17n -\fIs\fR is not a valid descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNREFUSED\fR\fR -.ad -.RS 17n -The attempt to connect was forcefully rejected. The calling program should -\fBclose\fR(2) the socket descriptor, and issue another \fBsocket\fR(3SOCKET) -call to obtain a new descriptor before attempting another \fBconnect()\fR call. -.RE - -.sp -.ne 2 -.na -\fB\fBEINPROGRESS\fR\fR -.ad -.RS 17n -The socket is non-blocking, and the connection cannot be completed immediately. -See the section on \fBNon-blocking Sockets\fR for more information. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 17n -The connection attempt was interrupted before any data arrived by the delivery -of a signal. The connection, however, will be established asynchronously. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 17n -\fInamelen\fR is not the size of a valid address for the specified address -family. -.RE - -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 17n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBEISCONN\fR\fR -.ad -.RS 17n -The socket is already connected. -.RE - -.sp -.ne 2 -.na -\fB\fBELOOP\fR\fR -.ad -.RS 17n -Too many symbolic links were encountered in translating the pathname in -\fIname\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENETUNREACH\fR\fR -.ad -.RS 17n -The network is not reachable from this host. -.RE - -.sp -.ne 2 -.na -\fB\fBEHOSTUNREACH\fR\fR -.ad -.RS 17n -The remote host is not reachable from this host. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 17n -A component of the path prefix of the pathname in \fIname\fR does not exist. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 17n -The socket referred to by the pathname in \fIname\fR does not exist. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 17n -There were insufficient \fBSTREAMS\fR resources available to complete the -operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENXIO\fR\fR -.ad -.RS 17n -The server exited before the connection was complete. -.RE - -.sp -.ne 2 -.na -\fB\fBETIMEDOUT\fR\fR -.ad -.RS 17n -Connection establishment timed out without establishing a connection. -.RE - -.sp -.ne 2 -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 17n -The socket is marked as non-blocking, and the requested operation would block. -.RE - -.sp -.LP -The following errors are specific to connecting names in the UNIX domain. -These errors might not apply in future versions of the UNIX \fBIPC\fR domain. -.sp -.ne 2 -.na -\fB\fBENOTDIR\fR\fR -.ad -.RS 14n -A component of the path prefix of the pathname in \fIname\fR is not a -directory. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 14n -\fIs\fR is not a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 14n -\fIname\fR is not a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTOTYPE\fR\fR -.ad -.RS 14n -The file that is referred to by \fIname\fR is a socket of a type other than -type \fIs\fR. For example, \fIs\fR is a \fBSOCK_DGRAM\fR socket, while -\fIname\fR refers to a \fBSOCK_STREAM\fR socket. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.LP -\fBclose\fR(2), \fBaccept\fR(3SOCKET), \fBgetsockname\fR(3SOCKET), -\fBselect\fR(3C), \fBsocket\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), -\fBsocket.h\fR(3HEAD), \fBattributes\fR(5) diff --git a/usr/src/man/man3socket/getpeername.3socket b/usr/src/man/man3socket/getpeername.3socket deleted file mode 100644 index 99112c4507..0000000000 --- a/usr/src/man/man3socket/getpeername.3socket +++ /dev/null @@ -1,98 +0,0 @@ -'\" te -.\" Copyright 1989 AT&T Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH GETPEERNAME 3SOCKET "Mar 26, 1998" -.SH NAME -getpeername \- get name of connected peer -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - -\fBint\fR \fBgetpeername\fR(\fBint\fR \fIs\fR, \fBstruct sockaddr *\fR\fIname\fR, \fBsocklen_t *\fR\fInamelen\fR); -.fi - -.SH DESCRIPTION -.LP -\fBgetpeername()\fR returns the name of the peer connected to socket \fIs\fR. -The \fBint\fR pointed to by the \fInamelen\fR parameter should be initialized -to indicate the amount of space pointed to by \fIname\fR. On return it contains -the actual size of the name returned (in bytes), prior to any truncation. The -name is truncated if the buffer provided is too small. -.SH RETURN VALUES -.LP -If successful, \fBgetpeername()\fR returns \fB0\fR; otherwise it returns -\fB\(mi1\fR and sets \fBerrno\fR to indicate the error. -.SH ERRORS -.LP -The call succeeds unless: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 12n -The argument \fIs\fR is not a valid descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 12n -There was insufficient user memory for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 12n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 12n -The socket is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 12n -The argument \fIs\fR is not a socket. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.LP -\fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBgetsockname\fR(3SOCKET), -\fBsockaddr\fR(3SOCKET), -\fBsocket\fR(3SOCKET), \fBattributes\fR(5), \fBsocket.h\fR(3HEAD) diff --git a/usr/src/man/man3socket/getsockname.3socket b/usr/src/man/man3socket/getsockname.3socket deleted file mode 100644 index 523d566310..0000000000 --- a/usr/src/man/man3socket/getsockname.3socket +++ /dev/null @@ -1,87 +0,0 @@ -'\" te -.\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH GETSOCKNAME 3SOCKET "Dec 12, 1997" -.SH NAME -getsockname \- get socket name -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - -\fBint\fR \fBgetsockname\fR(\fBint\fR \fIs\fR, \fBstruct sockaddr *\fR\fIname\fR, \fBsocklen_t *\fR\fInamelen\fR); -.fi - -.SH DESCRIPTION -.LP -\fBgetsockname()\fR returns the current \fIname\fR for socket \fIs\fR. The -\fInamelen\fR parameter should be initialized to indicate the amount of space -pointed to by \fIname\fR. On return it contains the actual size in bytes of the -name returned. -.SH RETURN VALUES -.LP -If successful, \fBgetsockname()\fR returns \fB0\fR; otherwise it returns -\fB\(mi1\fR and sets \fIerrno\fR to indicate the error. -.SH ERRORS -.LP -The call succeeds unless: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 12n -The argument \fIs\fR is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 12n -There was insufficient memory available for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 12n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 12n -The argument \fIs\fR is not a socket. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.LP -\fBbind\fR(3SOCKET), \fBgetpeername\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), -\fBsocket\fR(3SOCKET), \fBattributes\fR(5) diff --git a/usr/src/man/man3socket/getsockopt.3socket b/usr/src/man/man3socket/getsockopt.3socket deleted file mode 100644 index fdd9c9f54e..0000000000 --- a/usr/src/man/man3socket/getsockopt.3socket +++ /dev/null @@ -1,531 +0,0 @@ -'\" te -.\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved -.\" Copyright 1989 AT&T -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH GETSOCKOPT 3SOCKET "Jan 27, 2009" -.SH NAME -getsockopt, setsockopt \- get and set options on sockets -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - -\fBint\fR \fBgetsockopt\fR(\fBint\fR \fIs\fR, \fBint\fR \fIlevel\fR, \fBint\fR \fIoptname\fR, \fBvoid *\fR\fIoptval\fR, - \fBint *\fR\fIoptlen\fR); -.fi - -.LP -.nf -\fBint\fR \fBsetsockopt\fR(\fBint\fR \fIs\fR, \fBint\fR \fIlevel\fR, \fBint\fR \fIoptname\fR, \fBconst void *\fR\fIoptval\fR, - \fBint\fR \fIoptlen\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBgetsockopt()\fR and \fBsetsockopt()\fR functions manipulate options -associated with a socket. Options may exist at multiple protocol levels; they -are always present at the uppermost "socket" level. -.sp -.LP -The \fIlevel\fR argument specifies the protocol level at which the option -resides. To manipulate options at the socket level, specify the \fIlevel\fR -argument as \fBSOL_SOCKET\fR. To manipulate options at the protocol level, -supply the appropriate protocol number for the protocol controlling the option. -For example, to indicate that an option will be interpreted by the \fBTCP\fR, -set \fIlevel\fR to the protocol number of \fBTCP\fR, as defined in the -\fB\fR header, or as determined by using -\fBgetprotobyname\fR(3SOCKET). Some socket protocol families may also define -additional levels, such as \fBSOL_ROUTE\fR. Only socket-level options are -described here. -.sp -.LP -The parameters \fIoptval\fR and \fIoptlen\fR are used to access option values -for \fBsetsockopt()\fR. For \fBgetsockopt()\fR, they identify a buffer in which -the value(s) for the requested option(s) are to be returned. For -\fBgetsockopt()\fR, \fIoptlen\fR is a value-result parameter, initially -containing the size of the buffer pointed to by \fIoptval\fR, and modified on -return to indicate the actual size of the value returned. Use a 0 \fIoptval\fR -if no option value is to be supplied or returned. -.sp -.LP -The \fIoptname\fR and any specified options are passed uninterpreted to the -appropriate protocol module for interpretation. The include file -<\fBsys/socket.h\fR> contains definitions for the socket-level options -described below. Options at other protocol levels vary in format and name. -.sp -.LP -Most socket-level options take an \fBint\fR for \fIoptval\fR. For -\fBsetsockopt()\fR, the \fIoptval\fR parameter should be non-zero to enable a -boolean option, or zero if the option is to be disabled. \fBSO_LINGER\fR uses a -\fBstruct linger\fR parameter that specifies the desired state of the option -and the linger interval. \fBstruct linger\fR is defined in -<\fBsys/socket.h\fR>. \fBstruct\fR \fBlinger\fR contains the following members: -.sp -.ne 2 -.na -\fB\fBl_onoff\fR\fR -.ad -.RS 12n -on = 1/off = 0 -.RE - -.sp -.ne 2 -.na -\fB\fBl_linger\fR\fR -.ad -.RS 12n -linger time, in seconds -.RE - -.sp -.LP -The following options are recognized at the socket level. Except as noted, each -may be examined with \fBgetsockopt()\fR and set with \fBsetsockopt()\fR. -.sp -.ne 2 -.na -\fB\fBSO_DEBUG\fR\fR -.ad -.RS 19n -enable/disable recording of debugging information -.RE - -.sp -.ne 2 -.na -\fB\fBSO_REUSEADDR\fR\fR -.ad -.RS 19n -enable/disable local address reuse -.RE - -.sp -.ne 2 -.na -\fB\fBSO_KEEPALIVE\fR\fR -.ad -.RS 19n -enable/disable keep connections alive -.RE - -.sp -.ne 2 -.na -\fB\fBSO_DONTROUTE\fR\fR -.ad -.RS 19n -enable/disable routing bypass for outgoing messages -.RE - -.sp -.ne 2 -.na -\fB\fBSO_LINGER\fR\fR -.ad -.RS 19n -linger on close if data is present -.RE - -.sp -.ne 2 -.na -\fB\fBSO_BROADCAST\fR\fR -.ad -.RS 19n -enable/disable permission to transmit broadcast messages -.RE - -.sp -.ne 2 -.na -\fB\fBSO_OOBINLINE\fR\fR -.ad -.RS 19n -enable/disable reception of out-of-band data in band -.RE - -.sp -.ne 2 -.na -\fB\fBSO_SNDBUF\fR\fR -.ad -.RS 19n -set buffer size for output -.RE - -.sp -.ne 2 -.na -\fB\fBSO_RCVBUF\fR\fR -.ad -.RS 19n -set buffer size for input -.RE - -.sp -.ne 2 -.na -\fB\fBSO_DGRAM_ERRIND\fR\fR -.ad -.RS 19n -application wants delayed error -.RE - -.sp -.ne 2 -.na -\fB\fBSO_TIMESTAMP\fR\fR -.ad -.RS 19n -enable/disable reception of timestamp with datagrams -.RE - -.sp -.ne 2 -.na -\fB\fBSO_EXCLBIND\fR\fR -.ad -.RS 19n -enable/disable exclusive binding of the socket -.RE - -.sp -.ne 2 -.na -\fB\fBSO_TYPE\fR\fR -.ad -.RS 19n -get the type of the socket (get only) -.RE - -.sp -.ne 2 -.na -\fB\fBSO_ERROR\fR\fR -.ad -.RS 19n -get and clear error on the socket (get only) -.RE - -.sp -.ne 2 -.na -\fB\fBSO_MAC_EXEMPT\fR\fR -.ad -.RS 19n -get or set mandatory access control on the socket. This option is available -only when the system is configured with Trusted Extensions. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_ALLZONES\fR\fR -.ad -.RS 19n -bypass zone boundaries (privileged). -.RE - -.sp -.ne 2 -.na -\fB\fBSO_DOMAIN\fR\fR -.ad -.RS 19n -get the domain used in the socket (get only) -.RE - -.sp -.ne 2 -.na -\fB\fBSO_PROTOTYPE\fR\fR -.ad -.RS 19n -for socket in domains \fBPF_INET\fR and \fBPF_INET6\fR, get the underlying -protocol number used in the socket. For socket in domain \fBPF_ROUTE\fR, get -the address family used in the socket. -.RE - -.sp -.LP -The \fBSO_DEBUG\fR option enables debugging in the underlying protocol modules. -The \fBSO_REUSEADDR\fR option indicates that the rules used in validating -addresses supplied in a \fBbind\fR(3SOCKET) call should allow reuse of local -addresses. The \fBSO_KEEPALIVE\fR option enables the periodic transmission of -messages on a connected socket. If the connected party fails to respond to -these messages, the connection is considered broken and threads using the -socket are notified using a \fBSIGPIPE\fR signal. The \fBSO_DONTROUTE\fR option -indicates that outgoing messages should bypass the standard routing facilities. -Instead, messages are directed to the appropriate network interface according -to the network portion of the destination address. -.sp -.LP -The \fBSO_LINGER\fR option controls the action taken when unsent messages are -queued on a socket and a \fBclose\fR(2) is performed. If the socket promises -reliable delivery of data and \fBSO_LINGER\fR is set, the system will block the -thread on the \fBclose()\fR attempt until it is able to transmit the data or -until it decides it is unable to deliver the information (a timeout period, -termed the linger interval, is specified in the \fBsetsockopt()\fR call when -\fBSO_LINGER\fR is requested). If \fBSO_LINGER\fR is disabled and a -\fBclose()\fR is issued, the system will process the \fBclose()\fR in a manner -that allows the thread to continue as quickly as possible. -.sp -.LP -The option \fBSO_BROADCAST\fR requests permission to send broadcast datagrams -on the socket. With protocols that support out-of-band data, the -\fBSO_OOBINLINE\fR option requests that out-of-band data be placed in the -normal data input queue as received; it will then be accessible with -\fBrecv()\fR or \fBread()\fR calls without the \fBMSG_OOB\fR flag. -.sp -.LP -The \fBSO_SNDBUF\fR and \fBSO_RCVBUF\fR options adjust the normal buffer sizes -allocated for output and input buffers, respectively. The buffer size may be -increased for high-volume connections or may be decreased to limit the possible -backlog of incoming data. The maximum buffer size for \fBUDP\fR is determined -by the value of the \fBndd\fR variable \fBudp_max_buf\fR. The maximum buffer -size for \fBTCP\fR is determined the value of the \fBndd\fR variable -\fBtcp_max_buf\fR. Use the \fBndd\fR(1M) utility to determine the current -default values. See the \fISolaris Tunable Parameters Reference Manual\fR for -information on setting the values of \fBudp_max_buf\fR and \fBtcp_max_buf\fR. -At present, lowering \fBSO_RCVBUF\fR on a TCP connection after it has been -established has no effect. -.sp -.LP -By default, delayed errors (such as \fBICMP\fR port unreachable packets) are -returned only for connected datagram sockets. The \fBSO_DGRAM_ERRIND\fR option -makes it possible to receive errors for datagram sockets that are not -connected. When this option is set, certain delayed errors received after -completion of a \fBsendto()\fR or \fBsendmsg()\fR operation will cause a -subsequent \fBsendto()\fR or \fBsendmsg()\fR operation using the same -destination address (\fIto\fR parameter) to fail with the appropriate error. -See \fBsend\fR(3SOCKET). -.sp -.LP -If the \fBSO_TIMESTAMP\fR option is enabled on a \fBSO_DGRAM\fR or a -\fBSO_RAW\fR socket, the \fBrecvmsg\fR(3XNET) call will return a timestamp in -the native data format, corresponding to when the datagram was received. -.sp -.LP -The \fBSO_EXCLBIND\fR option is used to enable or disable the exclusive binding -of a socket. It overrides the use of the \fBSO_REUSEADDR\fR option to reuse an -address on \fBbind\fR(3SOCKET). The actual semantics of the \fBSO_EXCLBIND\fR -option depend on the underlying protocol. See \fBtcp\fR(7P) or \fBudp\fR(7P) -for more information. -.sp -.LP -The \fBSO_TYPE\fR and \fBSO_ERROR\fR options are used only with -\fBgetsockopt()\fR. The \fBSO_TYPE\fR option returns the type of the socket, -for example, \fBSOCK_STREAM\fR. It is useful for servers that inherit sockets -on startup. The \fBSO_ERROR\fR option returns any pending error on the socket -and clears the error status. It may be used to check for asynchronous errors on -connected datagram sockets or for other asynchronous errors. -.sp -.LP -The \fBSO_MAC_EXEMPT\fR option is used to toggle socket behavior with unlabeled -peers. A socket that has this option enabled can communicate with an unlabeled -peer if it is in the global zone or has a label that dominates the default -label of the peer. Otherwise, the socket must have a label that is equal to the -default label of the unlabeled peer. Calling \fBsetsockopt()\fR with this -option returns an \fBEACCES\fR error if the process lacks the -\fBNET_MAC_AWARE\fR privilege or if the socket is bound. The -\fBSO_MAC_EXEMPT\fR option is available only when the system is configured with -Trusted Extensions. -.sp -.LP -The \fBSO_ALLZONES\fR option can be used to bypass zone boundaries between -shared-IP zones. Normally, the system prevents a socket from being bound to an -address that is not assigned to the current zone. It also prevents a socket -that is bound to a wildcard address from receiving traffic for other zones. -However, some daemons which run in the global zone might need to send and -receive traffic using addresses that belong to other shared-IP zones. If set -before a socket is bound, \fBSO_ALLZONES\fR causes the socket to ignore zone -boundaries between shared-IP zones and permits the socket to be bound to any -address assigned to the shared-IP zones. If the socket is bound to a wildcard -address, it receives traffic intended for all shared-IP zones and behaves as if -an equivalent socket were bound in each active shared-IP zone. Applications -that use the \fBSO_ALLZONES\fR option to initiate connections or send datagram -traffic should specify the source address for outbound traffic by binding to a -specific address. There is no effect from setting this option in an -exclusive-IP zone. Setting this option requires the \fBsys_net_config\fR -privilege. See \fBzones\fR(5). -.SH RETURN VALUES -.sp -.LP -If successful, \fBgetsockopt()\fR and \fBsetsockopt()\fR return \fB0\fR. -Otherwise, the functions return \fB\(mi1\fR and set \fBerrno\fR to indicate the -error. -.SH ERRORS -.sp -.LP -The \fBgetsockopt()\fR and \fBsetsockopt()\fR calls succeed unless: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 17n -The argument \fIs\fR is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 17n -There was insufficient memory available for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOPROTOOPT\fR\fR -.ad -.RS 17n -The option is unknown at the level indicated. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 17n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 17n -The argument \fIs\fR is not a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 17n -\fBSO_SNDBUF\fR or \fBSO_RCVBUF\fR exceeds a system limit. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 17n -Invalid length for a given socket option. -.RE - -.sp -.ne 2 -.na -\fB\fBEHOSTUNREACH\fR\fR -.ad -.RS 17n -Invalid address for \fBIP_MULTICAST_IF\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 17n -Not a multicast address for \fBIP_ADD_MEMBERSHIP\fR and -\fBIP_DROP_MEMBERSHIP\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRNOTAVAIL\fR\fR -.ad -.RS 17n -Bad interface address for \fBIP_ADD_MEMBERSHIP\fR and \fBIP_DROP_MEMBERSHIP\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRINUSE\fR\fR -.ad -.RS 17n -Address already joined for \fBIP_ADD_MEMBERSHIP\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 17n -Address not joined for \fBIP_DROP_MEMBERSHIP\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEPERM\fR\fR -.ad -.RS 17n -No permissions. -.RE - -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 17n -Permission denied. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 17n -The specified option is invalid at the specified socket level, or the socket -has been shut down. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBndd\fR(1M), \fBclose\fR(2), \fBioctl\fR(2), \fBread\fR(2), -\fBbind\fR(3SOCKET), \fBgetprotobyname\fR(3SOCKET), \fBrecv\fR(3SOCKET), -\fBrecvmsg\fR(3XNET), \fBsend\fR(3SOCKET), \fBsocket\fR(3SOCKET), -\fBsocket.h\fR(3HEAD), \fBattributes\fR(5), \fBzones\fR(5), \fBtcp\fR(7P), -\fBudp\fR(7P) -.sp -.LP -\fISolaris Tunable Parameters Reference Manual\fR diff --git a/usr/src/man/man3socket/listen.3socket b/usr/src/man/man3socket/listen.3socket deleted file mode 100644 index 09d9420082..0000000000 --- a/usr/src/man/man3socket/listen.3socket +++ /dev/null @@ -1,100 +0,0 @@ -'\" te -.\" Copyright 1989 AT&T -.\" Copyright (C) 1999, Sun Microsystems, -.\" Inc. All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH LISTEN 3SOCKET "Nov 8, 1999" -.SH NAME -listen \- listen for connections on a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - -\fBint\fR \fBlisten\fR(\fBint\fR \fIs\fR, \fBint\fR \fIbacklog\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -To accept connections, a socket is first created with \fBsocket\fR(3SOCKET), a -backlog for incoming connections is specified with \fBlisten()\fR and then the -connections are accepted with \fBaccept\fR(3SOCKET). The \fBlisten()\fR call -applies only to sockets of type \fBSOCK_STREAM\fR or \fBSOCK_SEQPACKET\fR. -.sp -.LP -The \fIbacklog\fR parameter defines the maximum length the queue of pending -connections may grow to. -.sp -.LP -If a connection request arrives with the queue full, the client will receive an -error with an indication of \fBECONNREFUSED\fR for \fBAF_UNIX\fR sockets. If -the underlying protocol supports retransmission, the connection request may be -ignored so that retries may succeed. For \fBAF_INET\fR and -\fBAF_INET6\fRsockets, the \fBTCP\fR will retry the connection. If the -\fIbacklog\fR is not cleared by the time the tcp times out, the connect will -fail with \fBETIMEDOUT\fR. -.SH RETURN VALUES -.sp -.LP -A \fB0\fR return value indicates success; \fB\(mi1\fR indicates an error. -.SH ERRORS -.sp -.LP -The call fails if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 14n -The argument \fIs\fR is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 14n -The argument \fIs\fR is not a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 14n -The socket is not of a type that supports the operation \fBlisten()\fR. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBaccept\fR(3SOCKET), \fBconnect\fR(3SOCKET), \fBsocket\fR(3SOCKET), -\fBattributes\fR(5), \fBsocket.h\fR(3HEAD) -.SH NOTES -.sp -.LP -There is currently no \fIbacklog\fR limit. diff --git a/usr/src/man/man3socket/recv.3socket b/usr/src/man/man3socket/recv.3socket deleted file mode 100644 index 7c893b5aaf..0000000000 --- a/usr/src/man/man3socket/recv.3socket +++ /dev/null @@ -1,291 +0,0 @@ -'\" te -.\" Copyright 1989 AT&T -.\" Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH RECV 3SOCKET "Dec 03, 2014" -.SH NAME -recv, recvfrom, recvmsg \- receive a message from a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] -#include -#include -#include - -\fBssize_t\fR \fBrecv\fR(\fBint\fR \fIs\fR, \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIlen\fR, \fBint\fR \fIflags\fR); -.fi - -.LP -.nf -\fBssize_t\fR \fBrecvfrom\fR(\fBint\fR \fIs\fR, \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIlen\fR, \fBint\fR \fIflags\fR, - \fBstruct sockaddr *\fR\fIfrom\fR, \fBsocklen_t *\fR\fIfromlen\fR); -.fi - -.LP -.nf -\fBssize_t\fR \fBrecvmsg\fR(\fBint\fR \fIs\fR, \fBstruct msghdr *\fR\fImsg\fR, \fBint\fR \fIflags\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBrecv()\fR, \fBrecvfrom()\fR, and \fBrecvmsg()\fR functions are used to -receive messages from another socket. The \fIs\fR socket is created with -\fBsocket\fR(3SOCKET). -.sp -.LP -If \fIfrom\fR is a non-\fBNULL\fR pointer, the source address of the message is -filled in. The value-result parameter \fIfromlen\fR is initialized to the size -of the buffer associated with \fIfrom\fR and modified on return to indicate the -actual size of the address stored in the buffer. The length of the message is -returned. If a message is too long to fit in the supplied buffer, excess bytes -may be discarded depending on the type of socket from which the message is -received. See \fBsocket\fR(3SOCKET). -.sp -.LP -If no messages are available at the socket, the receive call waits for a -message to arrive. If the socket is non-blocking, \fB-1\fR is returned with the -external variable \fBerrno\fR set to \fBEWOULDBLOCK\fR. See \fBfcntl\fR(2). -.sp -.LP -For processes on the same host, \fBrecvmsg()\fR can be used to receive a file -descriptor from another process, but it cannot receive ancillary data. See -\fBlibxnet\fR(3LIB). -.sp -.LP -If a zero-length buffer is specified for a message, an EOF condition results -that is indistinguishable from the successful transfer of a file descriptor. -For that reason, one or more bytes of data should be provided when -\fBrecvmsg()\fR passes a file descriptor. -.sp -.LP -The \fBselect\fR(3C) call can be used to determine when more data arrives. -.sp -.LP -The \fIflags\fR parameter is formed by an \fBOR\fR operation on one or more of -the following: -.sp -.ne 2 -.na -\fB\fBMSG_OOB\fR\fR -.ad -.RS 16n -Read any \fBout-of-band\fR data present on the socket rather than the regular -\fBin-band\fR data. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_PEEK\fR\fR -.ad -.RS 16n -Peek at the data present on the socket. The data is returned, but not consumed -to allow a subsequent receive operation to see the same data. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_WAITALL\fR\fR -.ad -.RS 16n -Messages are blocked until the full amount of data requested is returned. The -\fBrecv()\fR function can return a smaller amount of data if a signal is -caught, the connection is terminated, \fBMSG_PEEK\fR is specified, or if an -error is pending for the socket. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_DONTWAIT\fR\fR -.ad -.RS 16n -Pending messages received on the connection are returned. If data is -unavailable, the function does not block. This behavior is the equivalent to -specifying \fBO_NONBLOCK\fR on the file descriptor of a socket, except that -write requests are unaffected. -.RE - -.sp -.LP -The \fBrecvmsg()\fR function call uses a \fBmsghdr\fR structure defined in -<\fBsys/socket.h\fR> to minimize the number of directly supplied parameters. -.SH RETURN VALUES -.LP -Upon successful completion, these functions return the number of bytes -received. Otherwise, they return \fB-1\fR and set \fBerrno\fR to indicate the -error. -.SH ERRORS -.LP -The \fBrecv()\fR, \fBrecvfrom()\fR, and \fBrecvmsg()\fR functions return errors -under the following conditions: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -The \fIs\fR file descriptor is invalid. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 16n -The \fIs\fR argument refers to a connection oriented socket and the connection -was forcibly closed by the peer and is no longer valid. I/O can no longer be -performed to \fIfiledes\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The \fBMSG_OOB\fR flag is set and no out-of-band data is available. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 16n -The operation is interrupted by the delivery of a signal before any data is -available to be received. -.RE - -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 16n -An I/O error occurs while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 16n -Insufficient user memory is available to complete operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 16n -Insufficient \fBSTREAMS\fR resources are available for the operation to -complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -\fIs\fR is not a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBESTALE\fR\fR -.ad -.RS 16n -A stale NFS file handle exists. -.RE - -.sp -.ne 2 -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 16n -The socket is marked non-blocking and the requested operation would block. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNREFUSED\fR\fR -.ad -.RS 16n -The requested connection was refused by the peer. For connected IPv4 and IPv6 -datagram sockets, this indicates that the system received an \fBICMP -Destination Port Unreachable\fR message from the peer. -.RE - -.sp -.LP -The \fBrecv()\fR and \fBrecvfrom()\fR functions fail under the following -conditions: -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 10n -The \fIlen\fR argument overflows a \fBssize_t\fR. -.RE - -.sp -.LP -The \fBrecvmsg()\fR function returns errors under the following conditions: -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 10n -The \fBmsg_iovlen\fR member of the \fBmsghdr\fR structure pointed to by -\fImsg\fR is less than or equal to \fB0\fR, or greater than \fB[IOV_MAX}\fR. -See \fBIntro\fR(2) for a definition of \fB[IOV_MAX}\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 10n -One of the \fIiov_len\fR values in the \fBmsg_iov\fR array member of the -\fBmsghdr\fR structure pointed to by \fImsg\fR is negative, or the sum of the -\fIiov_len\fR values in the \fBmsg_iov\fR array overflows a \fBssize_t\fR. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Committed -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.LP -\fBfcntl\fR(2), \fBioctl\fR(2), \fBread\fR(2), \fBconnect\fR(3SOCKET), -\fBgetsockopt\fR(3SOCKET), \fBlibxnet\fR(3LIB), \fBselect\fR(3C), -\fBsend\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), -\fBsocket.h\fR(3HEAD), \fBattributes\fR(5) diff --git a/usr/src/man/man3socket/send.3socket b/usr/src/man/man3socket/send.3socket deleted file mode 100644 index c12f4b7816..0000000000 --- a/usr/src/man/man3socket/send.3socket +++ /dev/null @@ -1,280 +0,0 @@ -'\" te -.\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved -.\" Copyright 1989 AT&T -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with -.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SEND 3SOCKET "April 9, 2016" -.SH NAME -send, sendto, sendmsg \- send a message from a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] -#include -#include - -\fBssize_t\fR \fBsend\fR(\fBint\fR \fIs\fR, \fBconst void *\fR\fImsg\fR, \fBsize_t\fR \fIlen\fR, \fBint\fR \fIflags\fR); -.fi - -.LP -.nf -\fBssize_t\fR \fBsendto\fR(\fBint\fR \fIs\fR, \fBconst void *\fR\fImsg\fR, \fBsize_t\fR \fIlen\fR, \fBint\fR \fIflags\fR, - \fBconst struct sockaddr *\fR\fIto\fR, \fBint\fR \fItolen\fR); -.fi - -.LP -.nf -\fBssize_t\fR \fBsendmsg\fR(\fBint\fR \fIs\fR, \fBconst struct msghdr *\fR\fImsg\fR, \fBint\fR \fIflags\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBsend()\fR, \fBsendto()\fR, and \fBsendmsg()\fR functions are used to -transmit a message to another transport end-point. The \fBsend()\fR function -can be used only when the socket is in a connected state. See -\fBconnect\fR(3SOCKET). The \fBsendto()\fR and \fBsendmsg()\fR functions can be -used at any time. The \fIs\fR socket is created with \fBsocket\fR(3SOCKET). -.sp -.LP -The address of the target is supplied by \fIto\fR with a \fItolen\fR parameter -used to specify the size. The length of the message is supplied by the -\fIlen\fR parameter. For socket types such as \fBSOCK_DGRAM\fR and -\fBSOCK_RAW\fR that require atomic messages, the error \fBEMSGSIZE\fR is -returned and the message is not transmitted when it is too long to pass -atomically through the underlying protocol. The same restrictions do not apply -to \fBSOCK_STREAM\fR sockets. -.sp -.LP -A return value \fB\(mi1\fR indicates locally detected errors. It does not imply -a delivery failure. -.sp -.LP -If the socket does not have enough buffer space available to hold a message, -the \fBsend()\fR function blocks the message, unless the socket has been placed -in non-blocking I/O mode (see \fBfcntl\fR(2)). The \fBselect\fR(3C) or -\fBpoll\fR(2) call can be used to determine when it is possible to send more -data. -.sp -.LP -The \fIflags\fR parameter is formed from the bitwise OR of zero or more of the -following: -.sp -.ne 2 -.na -\fB\fBMSG_OOB\fR\fR -.ad -.RS 17n -Send \fBout-of-band\fR data on sockets that support this notion. The underlying -protocol must also support \fBout-of-band\fR data. Only \fBSOCK_STREAM\fR -sockets created in the \fBAF_INET\fR or the \fBAF_INET6\fR address family -support out-of-band data. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_DONTROUTE\fR\fR -.ad -.RS 17n -The \fBSO_DONTROUTE\fR option is turned on for the duration of the operation. -It is used only by diagnostic or routing programs. -.RE - -.sp -.LP -See \fBrecv\fR(3SOCKET) for a description of the \fBmsghdr\fR structure. -.SH RETURN VALUES -.LP -Upon successful completion, these functions return the number of bytes sent. -Otherwise, they return \fB-1\fR and set \fBerrno\fR to indicate the error. -.SH ERRORS -.LP -The \fBsend()\fR, \fBsendto()\fR, and \fBsendmsg()\fR functions return errors -under the following conditions: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -\fIs\fR is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 16n -The \fIs\fR argument refers to a connection oriented socket and the connection -was forcibly closed by the peer and is no longer valid. I/O can no longer be -performed to \fIfiledes\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 16n -The operation was interrupted by delivery of a signal before any data could be -buffered to be sent. -.RE - -.sp -.ne 2 -.na -\fB\fBEMSGSIZE\fR\fR -.ad -.RS 16n -The message is too large to be sent all at once (as the socket requires), or -the \fImsg_iovlen\fR member of the \fBmsghdr\fR structure pointed to by message -is less than 0 or is greater than {\fBIOV_MAX\fR}. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 16n -Insufficient memory is available to complete the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 16n -Insufficient STREAMS resources are available for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -\fIs\fR is not a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 16n -The socket is marked non-blocking and the requested operation would block. -\fBEWOULDBLOCK\fR is also returned when sufficient memory is not immediately -available to allocate a suitable buffer. In such a case, the operation can be -retried later. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNREFUSED\fR\fR -.ad -.RS 16n -The requested connection was refused by the peer. For connected IPv4 and IPv6 -datagram sockets, this indicates that the system received an \fBICMP -Destination Port Unreachable\fR message from the peer in response to some prior -transmission. -.RE - -.sp -.LP -The \fBsend()\fR and \fBsendto()\fR functions return errors under the following -conditions: -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 10n -The \fIlen\fR argument overflows a \fBssize_t\fR. -.sp -Inconsistent port attributes for system call. -.RE - -.sp -.LP -The \fBsendto()\fR function returns errors under the following conditions: -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 10n -The value specified for the \fItolen\fR parameter is not the size of a valid -address for the specified address family. -.RE - -.sp -.ne 2 -.na -\fB\fBEISCON\fR\fR -.ad -.RS 10n -A destination address was specified and the socket is already connected. -.RE - -.sp -.LP -The \fBsendmsg()\fR function returns errors under the following conditions: -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 10n -The \fBmsg_iovlen\fR member of the \fBmsghdr\fR structure pointed to by -\fImsg\fR is less than or equal to \fB0\fR, or the sum of the \fIiov_len\fR -values in the \fBmsg_iov\fR array overflows a \fBssize_t\fR. -.sp -One of the \fIiov_len\fR values in the \fBmsg_iov\fR array member of the -\fBmsghdr\fR structure pointed to by \fImsg\fR is negative, or the sum of the -\fIiov_len\fR values in the \fBmsg_iov\fR array overflows a \fBssize_t\fR. -.sp -\fBmsg_iov\fR contents are inconsistent with port attributes. -.RE - -.sp -.LP -The \fBsend()\fR function returns errors under the following conditions: -.sp -.ne 2 -.na -\fB\fBEPIPE\fR\fR -.ad -.RS 9n -The socket is shut down for writing, or the socket is connection-mode and is no -longer connected. In the latter case, if the socket is of type -\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Committed -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.LP -\fBfcntl\fR(2), \fBpoll\fR(2), \fBwrite\fR(2), \fBconnect\fR(3SOCKET), -\fBgetsockopt\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBselect\fR(3C), -\fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), -\fBattributes\fR(5) diff --git a/usr/src/man/man3socket/shutdown.3socket b/usr/src/man/man3socket/shutdown.3socket deleted file mode 100644 index a2f837b544..0000000000 --- a/usr/src/man/man3socket/shutdown.3socket +++ /dev/null @@ -1,107 +0,0 @@ -'\" te -.\" Copyright 1989 AT&T Copyright (c) 2005, -.\" Sun Microsystems, Inc. All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SHUTDOWN 3SOCKET "Jan 31, 2005" -.SH NAME -shutdown \- shut down part of a full-duplex connection -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] -#include - -\fBint\fR \fBshutdown\fR(\fBint\fR \fIs\fR, \fBint\fR \fIhow\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBshutdown()\fR call shuts down all or part of a full-duplex connection on -the socket associated with \fIs\fR. If \fIhow\fR is \fBSHUT_RD\fR, further -receives are disallowed. If \fIhow\fR is \fBSHUT_WR\fR, further sends are -disallowed. If \fIhow\fR is \fBSHUT_RDWR\fR, further sends and receives are -disallowed. -.sp -.LP -The \fIhow\fR values should be defined constants. -.SH RETURN VALUES -.sp -.LP -\fB0\fR is returned if the call succeeds. -.sp -.LP -\fB\(mi1\fR is returned if the call fails. -.SH ERRORS -.sp -.LP -The call succeeds unless one of the following conditions exists: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 12n -The \fIs\fR value is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 12n -Insufficient user memory is available for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 12n -Insufficient \fBSTREAMS\fR resources are available for the operation to -complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 12n -The specified socket is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 12n -The \fIs\fR value is not a socket. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBconnect\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), -\fBattributes\fR(5) diff --git a/usr/src/man/man3socket/socket.3socket b/usr/src/man/man3socket/socket.3socket deleted file mode 100644 index 61f9e6f3d8..0000000000 --- a/usr/src/man/man3socket/socket.3socket +++ /dev/null @@ -1,327 +0,0 @@ -'\" te -.\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright 1989 AT&T -.\" Copyright (c) 2013, OmniTI Computer Consulting, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SOCKET 3SOCKET "Jan 28, 2009" -.SH NAME -socket \- create an endpoint for communication -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - -\fBint\fR \fBsocket\fR(\fBint\fR \fIdomain\fR, \fBint\fR \fItype\fR, \fBint\fR \fIprotocol\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBsocket()\fR function creates an endpoint for communication and returns a -descriptor. -.sp -.LP -The \fIdomain\fR argument specifies the protocol family within which -communication takes place. The protocol family is generally the same as the -address family for the addresses supplied in later operations on the socket. -These families are defined in \fB\fR. -.sp -.LP -The currently supported protocol families are: -.sp -.ne 2 -.na -\fB\fBPF_UNIX\fR\fR -.ad -.RS 12n -\fBUNIX\fR system internal protocols -.RE - -.sp -.ne 2 -.na -\fB\fBPF_INET\fR\fR -.ad -.RS 12n -Internet Protocol Version 4 (IPv4) -.RE - -.sp -.ne 2 -.na -\fB\fBPF_INET6\fR\fR -.ad -.RS 12n -Internet Protocol Version 6 (IPv6) -.RE - -.sp -.ne 2 -.na -\fB\fBPF_NCA\fR\fR -.ad -.RS 12n -Network Cache and Accelerator (NCA) protocols -.RE - -.sp -.LP -The socket has the indicated \fItype\fR, which specifies the communication -semantics. Currently defined types are: -.sp -.in +2 -.nf -SOCK_STREAM -SOCK_DGRAM -SOCK_RAW -SOCK_SEQPACKET -SOCK_RDM -.fi -.in -2 - -.sp -.LP -The \fItype\fR may be augmented by a bitwise-inclusive-OR of flags from the -following list, defined in . - -.sp -.ne 2 -.na -\fB\fBSOCK_CLOEXEC\fR\fR -.ad -.RS 12n -Creates the socket with the \fBFD_CLOEXEC\fR flag set, causing the underlying -file descriptor to be closed prior to any future calls to \fBexec\fR(2). This -is similar in purpose to the \fBO_CLOEXEC\fR flag to \fBopen\fR(2). -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_NDELAY\fR\fR -.ad -.RS 12n -Creates the socket with the \fBO_NDELAY\fR flag set, causing the socket to -provide nonblocking semantics as described for \fBO_NDELAY\fR in \fBopen\fR(2). -\fBSOCK_NONBLOCK\fR should normally be used in preference to \fBSOCK_NDELAY\fR, -and takes precedence if both are set. See \fBopen\fR(2) for further details. -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_NONBLOCK\fR\fR -.ad -.RS 12n -Creates the socket with the \fBO_NONBLOCK\fR flag set, causing the socket to -provide nonblocking semantics as described for \fBO_NONBLOCK\fR in \fBopen\fR(2). -.RE - -.sp -.LP -There must be an entry in the \fBnetconfig\fR(4) file for at least each -protocol family and type required. If a non-zero protocol has been specified -but no exact match for the protocol family, type, and protocol is found, then -the first entry containing the specified family and type with a \fIprotocol\fR -value of zero will be used. -.sp -.LP -A \fBSOCK_STREAM\fR type provides sequenced, reliable, two-way connection-based -byte streams. An out-of-band data transmission mechanism may be supported. A -\fBSOCK_DGRAM\fR socket supports datagrams (connectionless, unreliable messages -of a fixed (typically small) maximum length). A \fBSOCK_SEQPACKET\fR socket may -provide a sequenced, reliable, two-way connection-based data transmission path -for datagrams of fixed maximum length; a consumer may be required to read an -entire packet with each read system call. This facility is protocol specific, -and presently not implemented for any protocol family. \fBSOCK_RAW\fR sockets -provide access to internal network interfaces. The types \fBSOCK_RAW\fR, which -is available only to a user with the \fBnet_rawaccess\fR privilege, and -\fBSOCK_RDM\fR, for which no implementation currently exists, are not described -here. -.sp -.LP -The \fIprotocol\fR parameter is a protocol-family-specific value which -specifies a particular protocol to be used with the socket. Normally this -value is zero, as commonly only a single protocol exists to support a -particular socket type within a given protocol family. However, multiple -protocols may exist, in which case a particular protocol may be specified in -this manner. -.sp -.LP -Sockets of type \fBSOCK_STREAM\fR are full-duplex byte streams, similar to -pipes. A stream socket must be in a \fIconnected\fR state before any data may -be sent or received on it. A connection to another socket is created with a -\fBconnect\fR(3SOCKET) call. Once connected, data may be transferred using -\fBread\fR(2) and \fBwrite\fR(2) calls or some variant of the -\fBsend\fR(3SOCKET) and \fBrecv\fR(3SOCKET) calls. When a session has been -completed, a \fBclose\fR(2) may be performed. Out-of-band data may also be -transmitted as described on the \fBsend\fR(3SOCKET) manual page and received as -described on the \fBrecv\fR(3SOCKET) manual page. -.sp -.LP -The communications protocols used to implement a \fBSOCK_STREAM\fR insure that -data is not lost or duplicated. If a piece of data for which the peer protocol -has buffer space cannot be successfully transmitted within a reasonable length -of time, then the connection is considered broken and calls will indicate an -error with \(mi1 returns and with \fBETIMEDOUT\fR as the specific code in the -global variable \fBerrno\fR. The protocols optionally keep sockets "warm" by -forcing transmissions roughly every minute in the absence of other activity. An -error is then indicated if no response can be elicited on an otherwise idle -connection for a extended period (for instance 5 minutes). A \fBSIGPIPE\fR -signal is raised if a thread sends on a broken stream; this causes naive -processes, which do not handle the signal, to exit. -.sp -.LP -\fBSOCK_SEQPACKET\fR sockets employ the same system calls as \fBSOCK_STREAM\fR -sockets. The only difference is that \fBread\fR(2) calls will return only the -amount of data requested, and any remaining in the arriving packet will be -discarded. -.sp -.LP -\fBSOCK_DGRAM\fR and \fBSOCK_RAW\fR sockets allow datagrams to be sent to -correspondents named in \fBsendto\fR(3SOCKET) calls. Datagrams are generally -received with \fBrecvfrom\fR(3SOCKET), which returns the next datagram with its -return address. -.sp -.LP -An \fBfcntl\fR(2) call can be used to specify a process group to receive a -\fBSIGURG\fR signal when the out-of-band data arrives. It can also enable -non-blocking I/O. -.sp -.LP -The operation of sockets is controlled by socket level \fIoptions\fR. These -options are defined in the file <\fBsys/socket.h\fR>. \fBsetsockopt\fR(3SOCKET) -and \fBgetsockopt\fR(3SOCKET) are used to set and get options, respectively. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, a descriptor referencing the socket is returned. -Otherwise, -1 is returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBsocket()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 19n -Permission to create a socket of the specified type or protocol is denied. -.RE - -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR\fR -.ad -.RS 19n -There were insufficient resources available to complete the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 19n -The specified address family is not supported by the protocol family. -.RE - -.sp -.ne 2 -.na -\fB\fBEMFILE\fR\fR -.ad -.RS 19n -The per-process descriptor table is full. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 19n -Insufficient user memory is available. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 19n -There were insufficient STREAMS resources available to complete the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBEPFNOSUPPORT\fR\fR -.ad -.RS 19n -The specified protocol family is not supported. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTONOSUPPORT\fR\fR -.ad -.RS 19n -The protocol type is not supported by the address family. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTOTYPE\fR\fR -.ad -.RS 19n -The socket type is not supported by the protocol. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 19n -One or more of the specified flags is not supported. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBnca\fR(1), \fBclose\fR(2), \fBfcntl\fR(2), \fBioctl\fR(2), \fBread\fR(2), -\fBwrite\fR(2), \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBexec\fR(2), -\fBconnect\fR(3SOCKET), \fBgetsockname\fR(3SOCKET), \fBgetsockopt\fR(3SOCKET), -\fBin.h\fR(3HEAD),\fBlisten\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBopen\fR(2), -\fBsetsockopt\fR(3SOCKET), \fBsend\fR(3SOCKET), \fBshutdown\fR(3SOCKET), -\fBsocket.h\fR(3HEAD), \fBsocketpair\fR(3SOCKET), \fBattributes\fR(5) -.SH NOTES -.sp -.LP -Historically, \fBAF_\fR* was commonly used in places where \fBPF_\fR* was -meant. New code should be careful to use \fBPF_\fR* as necessary. diff --git a/usr/src/man/man3socket/socketpair.3socket b/usr/src/man/man3socket/socketpair.3socket deleted file mode 100644 index afeb89b87b..0000000000 --- a/usr/src/man/man3socket/socketpair.3socket +++ /dev/null @@ -1,123 +0,0 @@ -'\" te -.\" Copyright 1989 AT&T -.\" Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SOCKETPAIR 3SOCKET "Jan 10, 2001" -.SH NAME -socketpair \- create a pair of connected sockets -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include -#include - -\fBint\fR \fBsocketpair\fR(\fBint\fR \fIdomain\fR, \fBint\fR \fItype\fR, \fBint\fR \fIprotocol\fR, \fBint\fR \fIsv\fR[2]); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBsocketpair()\fR library call creates an unnamed pair of connected -sockets in the specified address family \fIdomain\fR, of the specified -\fItype\fR, that uses the optionally specified \fIprotocol\fR. The descriptors -that are used in referencing the new sockets are returned in \fIsv\fR[0] and -\fIsv\fR[1]. The two sockets are indistinguishable. -.SH RETURN VALUES -.sp -.LP -\fBsocketpair()\fR returns \fB\(mi1\fR on failure and \fB0\fR on success. -.SH ERRORS -.sp -.LP -The call succeeds unless: -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 19n -The specified address family is not supported on this machine. -.RE - -.sp -.ne 2 -.na -\fB\fBEMFILE\fR\fR -.ad -.RS 19n -Too many descriptors are in use by this process. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 19n -There was insufficient user memory for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 19n -There were insufficient \fBSTREAMS\fR resources for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 19n -The specified protocol does not support creation of socket pairs. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTONOSUPPORT\fR\fR -.ad -.RS 19n -The specified protocol is not supported on this machine. -.RE - -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 19n -The process does not have appropriate privileges. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBpipe\fR(2), \fBread\fR(2), \fBwrite\fR(2), \fBsocket.h\fR(3HEAD), -\fBattributes\fR(5) -.SH NOTES -.sp -.LP -This call is currently implemented only for the \fBAF_UNIX\fR address family. diff --git a/usr/src/man/man3xnet/Makefile b/usr/src/man/man3xnet/Makefile index 81cd96cba3..5e383bbdc4 100644 --- a/usr/src/man/man3xnet/Makefile +++ b/usr/src/man/man3xnet/Makefile @@ -18,10 +18,7 @@ include $(SRC)/Makefile.master MANSECT= 3xnet -MANFILES= accept.3xnet \ - bind.3xnet \ - connect.3xnet \ - endhostent.3xnet \ +MANFILES= endhostent.3xnet \ endnetent.3xnet \ endprotoent.3xnet \ endservent.3xnet \ @@ -29,25 +26,10 @@ MANFILES= accept.3xnet \ gai_strerror.3xnet \ gethostname.3xnet \ getnameinfo.3xnet \ - getpeername.3xnet \ - getsockname.3xnet \ - getsockopt.3xnet \ htonl.3xnet \ if_nametoindex.3xnet \ inet_addr.3xnet \ - inet_ntop.3xnet \ - listen.3xnet \ - recv.3xnet \ - recvfrom.3xnet \ - recvmsg.3xnet \ - send.3xnet \ - sendmsg.3xnet \ - sendto.3xnet \ - setsockopt.3xnet \ - shutdown.3xnet \ - sockatmark.3xnet \ - socket.3xnet \ - socketpair.3xnet + inet_ntop.3xnet MANLINKS= getaddrinfo.3xnet \ gethostbyaddr.3xnet \ diff --git a/usr/src/man/man3xnet/accept.3xnet b/usr/src/man/man3xnet/accept.3xnet deleted file mode 100644 index a71931fb96..0000000000 --- a/usr/src/man/man3xnet/accept.3xnet +++ /dev/null @@ -1,262 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH ACCEPT 3XNET "Nov 1, 2003" -.SH NAME -accept \- accept a new connection on a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - - -\fBint\fR \fBaccept\fR(\fBint\fR \fIsocket\fR, \fBstruct sockaddr *restrict\fR \fIaddress\fR, - \fBsocklen_t *restrict\fR \fIaddress_len\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBaccept()\fR function extracts the first connection on the queue of -pending connections, creates a new socket with the same socket type protocol -and address family as the specified socket, and allocates a new file descriptor -for that socket. -.sp -.LP -The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 15n -Specifies a socket that was created with \fBsocket\fR(3XNET), has been bound to -an address with \fBbind\fR(3XNET), and has issued a successful call to -\fBlisten\fR(3XNET). -.RE - -.sp -.ne 2 -.na -\fB\fIaddress\fR\fR -.ad -.RS 15n -Either a null pointer, or a pointer to a \fBsockaddr\fR structure where the -address of the connecting socket will be returned. -.RE - -.sp -.ne 2 -.na -\fB\fIaddress_len\fR\fR -.ad -.RS 15n -Points to a \fBsocklen_t\fR which on input specifies the length of the supplied -\fBsockaddr\fR structure, and on output specifies the length of the stored -address. -.RE - -.sp -.LP -If \fIaddress\fR is not a null pointer, the address of the peer for the -accepted connection is stored in the \fBsockaddr\fR structure pointed to by -\fIaddress\fR, and the length of this address is stored in the object pointed -to by \fIaddress_len\fR. -.sp -.LP -If the actual length of the address is greater than the length of the supplied -\fBsockaddr\fR structure, the stored address will be truncated. -.sp -.LP -If the protocol permits connections by unbound clients, and the peer is not -bound, then the value stored in the object pointed to by \fIaddress\fR is -unspecified. -.sp -.LP -If the listen queue is empty of connection requests and O_NONBLOCK is not set -on the file descriptor for the socket, \fBaccept()\fR will block until a -connection is present. If the \fBlisten\fR(3XNET) queue is empty of connection -requests and O_NONBLOCK is set on the file descriptor for the socket, -\fBaccept()\fR will fail and set \fBerrno\fR to \fBEAGAIN\fR or -\fBEWOULDBLOCK\fR. -.sp -.LP -The accepted socket cannot itself accept more connections. The original socket -remains open and can accept more connections. -.SH USAGE -.LP -When a connection is available, \fBselect\fR(3C) will indicate that the file -descriptor for the socket is ready for reading. -.SH RETURN VALUES -.LP -Upon successful completion, \fBaccept()\fR returns the nonnegative file -descriptor of the accepted socket. Otherwise, \(mi1 is returned and -\fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBaccept()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR\fR -.ad -.br -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 16n -O_NONBLOCK is set for the socket file descriptor and no connections are present -to be accepted. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNABORTED\fR\fR -.ad -.RS 16n -A connection has been aborted. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 16n -The \fIaddress\fR or \fIaddress_len\fR parameter can not be accessed or -written. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 16n -The \fBaccept()\fR function was interrupted by a signal that was caught before -a valid connection arrived. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The \fIsocket\fR is not accepting connections. -.RE - -.sp -.ne 2 -.na -\fB\fBEMFILE\fR\fR -.ad -.RS 16n -\fBOPEN_MAX\fR file descriptors are currently open in the calling process. -.RE - -.sp -.ne 2 -.na -\fB\fBENFILE\fR\fR -.ad -.RS 16n -The maximum number of file descriptors in the system are already open. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 16n -The socket type of the specified socket does not support accepting connections. -.RE - -.sp -.LP -The \fBaccept()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -No buffer space is available. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 11n -There was insufficient memory available to complete the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There was insufficient STREAMS resources available to complete the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTO\fR\fR -.ad -.RS 11n -A protocol error has occurred; for example, the STREAMS protocol stack has not -been initialized. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBsockaddr\fR(3SOCKET), -\fBbind\fR(3XNET), \fBconnect\fR(3XNET), \fBlisten\fR(3XNET), -\fBsocket\fR(3XNET), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/bind.3xnet b/usr/src/man/man3xnet/bind.3xnet deleted file mode 100644 index f8c420a2e2..0000000000 --- a/usr/src/man/man3xnet/bind.3xnet +++ /dev/null @@ -1,316 +0,0 @@ -'\" te -.\" Copyright (c) 1997, The Open Group. All Rights Reserved. -.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH BIND 3XNET "Feb 20, 2003" -.SH NAME -bind \- bind a name to a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBbind\fR(\fBint\fR \fIsocket\fR, \fBconst struct sockaddr *\fR\fIaddress\fR, - \fBsocklen_t\fR \fIaddress_len\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBbind()\fR function assigns an \fIaddress\fR to an unnamed socket. -Sockets created with \fBsocket\fR(3XNET) function are initially unnamed. They -are identified only by their address family. -.sp -.LP -The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 15n -Specifies the file descriptor of the socket to be bound. -.RE - -.sp -.ne 2 -.na -\fB\fIaddress\fR\fR -.ad -.RS 15n -Points to a \fBsockaddr\fR structure containing the address to be bound to the -socket. The length and format of the address depend on the address family of -the socket. -.RE - -.sp -.ne 2 -.na -\fB\fIaddress_len\fR\fR -.ad -.RS 15n -Specifies the length of the \fBsockaddr\fR structure pointed to by the -\fIaddress\fR argument. -.RE - -.sp -.LP -The socket in use may require the process to have appropriate privileges to use -the \fBbind()\fR function. -.SH USAGE -.LP -An application program can retrieve the assigned socket name with the -\fBgetsockname\fR(3XNET) function. -.SH RETURN VALUES -.LP -Upon successful completion, \fBbind()\fR returns 0. Otherwise, \(mi1 is -returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBbind()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEADDRINUSE\fR\fR -.ad -.RS 17n -The specified address is already in use. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRNOTAVAIL\fR\fR -.ad -.RS 17n -The specified address is not available from the local machine. -.RE - -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 17n -The specified address is not a valid address for the address family of the -specified socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 17n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 17n -The \fIaddress\fR argument can not be accessed. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 17n -The socket is already bound to an address, and the protocol does not support -binding to a new address; or the socket has been shut down. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 17n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 17n -The socket type of the specified socket does not support binding to an address. -.RE - -.sp -.LP -If the address family of the socket is AF_UNIX, then \fBbind()\fR will fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 16n -A component of the path prefix denies search permission, or the requested name -requires writing in a directory with a mode that denies write permission. -.RE - -.sp -.ne 2 -.na -\fB\fBEDESTADDRREQ\fR\fR -.ad -.br -.na -\fB\fBEISDIR\fR\fR -.ad -.RS 16n -The \fIaddress\fR argument is a null pointer. -.RE - -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 16n -An I/O error occurred. -.RE - -.sp -.ne 2 -.na -\fB\fBELOOP\fR\fR -.ad -.RS 16n -Too many symbolic links were encountered in translating the pathname in -\fIaddress.\fR -.RE - -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -A component of a pathname exceeded \fINAME_MAX\fR characters, or an entire -pathname exceeded \fIPATH_MAX\fR characters. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 16n -A component of the pathname does not name an existing file or the pathname is -an empty string. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTDIR\fR\fR -.ad -.RS 16n -A component of the path prefix of the pathname in \fIaddress\fR is not a -directory. -.RE - -.sp -.ne 2 -.na -\fB\fBEROFS\fR\fR -.ad -.RS 16n -The name would reside on a read-only filesystem. -.RE - -.sp -.LP -The \fBbind()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 16n -The specified address is protected, and \fB{PRIV_NET_PRIVADOR}\fR is not -asserted in the effective set of the current process. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The \fIaddress_len\fR argument is not a valid length for the address family. -.RE - -.sp -.ne 2 -.na -\fB\fBEISCONN\fR\fR -.ad -.RS 16n -The socket is already connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -Pathname resolution of a symbolic link produced an intermediate result whose -length exceeds \fIPATH_MAX\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 16n -Insufficient resources were available to complete the call. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 16n -There were insufficient STREAMS resources for the operation to complete. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBsockaddr\fR(3SOCKET), -\fBconnect\fR(3XNET), \fBgetsockname\fR(3XNET), \fBlisten\fR(3XNET), -\fBsocket\fR(3XNET), \fBattributes\fR(5), \fBprivileges\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/connect.3xnet b/usr/src/man/man3xnet/connect.3xnet deleted file mode 100644 index e309631745..0000000000 --- a/usr/src/man/man3xnet/connect.3xnet +++ /dev/null @@ -1,409 +0,0 @@ -'\" te -.\" Copyright 1994, The X/Open Company Ltd. All Rights Reserved Portions Copyright 1989 AT&T Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH CONNECT 3XNET "Jun 10, 2002" -.SH NAME -connect \- connect a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBconnect\fR(\fBint\fR \fIsocket\fR, \fBconst struct sockaddr *\fR\fIaddress\fR, - \fBsocklen_t\fR \fIaddress_len\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBconnect()\fR function requests a connection to be made on a socket. The -function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 15n -Specifies the file descriptor associated with the socket. -.RE - -.sp -.ne 2 -.na -\fB\fIaddress\fR\fR -.ad -.RS 15n -Points to a \fBsockaddr\fR structure containing the peer address. The length -and format of the address depend on the address family of the socket. -.RE - -.sp -.ne 2 -.na -\fB\fIaddress_len\fR\fR -.ad -.RS 15n -Specifies the length of the \fBsockaddr\fR structure pointed to by the -\fIaddress\fR argument. -.RE - -.sp -.LP -If the socket has not already been bound to a local address, \fBconnect()\fR -will bind it to an address which, unless the socket's address family is -AF_UNIX, is an unused local address. -.sp -.LP -If the initiating socket is not connection-mode, then \fBconnect()\fR sets the -socket's peer address, but no connection is made. For SOCK_DGRAM sockets, the -peer address identifies where all datagrams are sent on subsequent -\fBsend\fR(3XNET) calls, and limits the remote sender for subsequent -\fBrecv\fR(3XNET) calls. If \fIaddress\fR is a null address for the protocol, -the socket's peer address will be reset. -.sp -.LP -If the initiating socket is connection-mode, then \fBconnect()\fR attempts to -establish a connection to the address specified by the \fIaddress\fR argument. -.sp -.LP -If the connection cannot be established immediately and O_NONBLOCK is not set -for the file descriptor for the socket, \fBconnect()\fR will block for up to an -unspecified timeout interval until the connection is established. If the -timeout interval expires before the connection is established, \fBconnect()\fR -will fail and the connection attempt will be aborted. If \fBconnect()\fR is -interrupted by a signal that is caught while blocked waiting to establish a -connection, \fBconnect()\fR will fail and set \fBerrno\fR to \fBEINTR\fR, but -the connection request will not be aborted, and the connection will be -established asynchronously. -.sp -.LP -If the connection cannot be established immediately and O_NONBLOCK is set for -the file descriptor for the socket, \fBconnect()\fR will fail and set -\fBerrno\fR to \fBEINPROGRESS\fR, but the connection request will not be -aborted, and the connection will be established asynchronously. Subsequent -calls to \fBconnect()\fR for the same socket, before the connection is -established, will fail and set \fBerrno\fR to \fBEALREADY\fR. -.sp -.LP -When the connection has been established asynchronously, \fBselect\fR(3C) and -\fBpoll\fR(2) will indicate that the file descriptor for the socket is ready -for writing. -.sp -.LP -The socket in use may require the process to have appropriate privileges to use -the \fBconnect()\fR function. -.SH USAGE -.LP -If \fBconnect()\fR fails, the state of the socket is unspecified. Portable -applications should close the file descriptor and create a new socket before -attempting to reconnect. -.SH RETURN VALUES -.LP -Upon successful completion, \fBconnect()\fR returns 0. Otherwise, \(mi1 is -returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBconnect()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEADDRNOTAVAIL\fR\fR -.ad -.RS 17n -The specified address is not available from the local machine. -.RE - -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 17n -The specified address is not a valid address for the address family of the -specified socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEALREADY\fR\fR -.ad -.RS 17n -A connection request is already in progress for the specified socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 17n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNREFUSED\fR\fR -.ad -.RS 17n -The target address was not listening for connections or refused the connection -request. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 17n -The address parameter can not be accessed. -.RE - -.sp -.ne 2 -.na -\fB\fBEINPROGRESS\fR\fR -.ad -.RS 17n -O_NONBLOCK is set for the file descriptor for the socket and the connection -cannot be immediately established; the connection will be established -asynchronously. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 17n -The attempt to establish a connection was interrupted by delivery of a signal -that was caught; the connection will be established asynchronously. -.RE - -.sp -.ne 2 -.na -\fB\fBEISCONN\fR\fR -.ad -.RS 17n -The specified socket is connection-mode and is already connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENETUNREACH\fR\fR -.ad -.RS 17n -No route to the network is present. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 17n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTOTYPE\fR\fR -.ad -.RS 17n -The specified address has a different type than the socket bound to the -specified peer address. -.RE - -.sp -.ne 2 -.na -\fB\fBETIMEDOUT\fR\fR -.ad -.RS 17n -The attempt to connect timed out before a connection was made. -.RE - -.sp -.LP -If the address family of the socket is AF_UNIX, then \fBconnect()\fR will fail -if: -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 16n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBELOOP\fR\fR -.ad -.RS 16n -Too many symbolic links were encountered in translating the pathname in -\fIaddress\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -A component of a pathname exceeded \fINAME_MAX\fR characters, or an entire -pathname exceeded \fIPATH_MAX\fR characters. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 16n -A component of the pathname does not name an existing file or the pathname is -an empty string. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTDIR\fR\fR -.ad -.RS 16n -A component of the path prefix of the pathname in \fIaddress\fR is not a -directory. -.RE - -.sp -.LP -The \fBconnect()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 16n -Search permission is denied for a component of the path prefix; or write access -to the named socket is denied. -.RE - -.sp -.ne 2 -.na -\fB\fBEADDRINUSE\fR\fR -.ad -.RS 16n -Attempt to establish a connection that uses addresses that are already in use. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 16n -Remote host reset the connection request. -.RE - -.sp -.ne 2 -.na -\fB\fBEHOSTUNREACH\fR\fR -.ad -.RS 16n -The destination host cannot be reached (probably because the host is down or a -remote router cannot reach it). -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The \fIaddress_len\fR argument is not a valid length for the address family; or -invalid address family in sockaddr structure. -.RE - -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -Pathname resolution of a symbolic link produced an intermediate result whose -length exceeds \fIPATH_MAX\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENETDOWN\fR\fR -.ad -.RS 16n -The local interface used to reach the destination is down. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 16n -No buffer space is available. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 16n -There were insufficient STREAMS resources available to complete the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 16n -The socket is listening and can not be connected. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBsockaddr\fR(3SOCKET), -\fBclose\fR(2), \fBpoll\fR(2), \fBaccept\fR(3XNET), \fBbind\fR(3XNET), -\fBgetsockname\fR(3XNET), \fBselect\fR(3C), \fBsend\fR(3XNET), -\fBshutdown\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/getpeername.3xnet b/usr/src/man/man3xnet/getpeername.3xnet deleted file mode 100644 index 4a28e3945f..0000000000 --- a/usr/src/man/man3xnet/getpeername.3xnet +++ /dev/null @@ -1,143 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH GETPEERNAME 3XNET "Jun 10, 2002" -.SH NAME -getpeername \- get the name of the peer socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBgetpeername\fR(\fBint\fR \fIsocket\fR, \fBstruct sockaddr *restrict\fR \fIaddress\fR, - \fBsocklen_t *restrict\fR \fIaddress_len\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBgetpeername()\fR function retrieves the peer address of the specified -socket, stores this address in the \fBsockaddr\fR structure pointed to by the -\fIaddress\fR argument, and stores the length of this address in the object -pointed to by the \fIaddress_len\fR argument. -.sp -.LP -If the actual length of the address is greater than the length of the supplied -\fBsockaddr\fR structure, the stored address will be truncated. -.sp -.LP -If the protocol permits connections by unbound clients, and the peer is not -bound, then the value stored in the object pointed to by \fIaddress\fR is -unspecified. -.SH RETURN VALUES -.LP -Upon successful completion, 0 is returned. Otherwise, \(mi1 is returned and -\fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBgetpeername()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 14n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 14n -The \fIaddress\fR or \fIaddress_len\fR parameter can not be accessed or -written. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 14n -The socket has been shut down. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 14n -The socket is not connected or otherwise has not had the peer prespecified. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 14n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 14n -The operation is not supported for the socket protocol. -.RE - -.sp -.LP -The \fBgetpeername()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to complete the call. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBsockaddr\fR(3SOCKET), -\fBaccept\fR(3XNET), \fBbind\fR(3XNET), \fBgetsockname\fR(3XNET), -\fBsocket\fR(3XNET), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/getsockname.3xnet b/usr/src/man/man3xnet/getsockname.3xnet deleted file mode 100644 index 5ce174499b..0000000000 --- a/usr/src/man/man3xnet/getsockname.3xnet +++ /dev/null @@ -1,135 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH GETSOCKNAME 3XNET "Jun 10, 2002" -.SH NAME -getsockname \- get the socket name -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBgetsockname\fR(\fBint\fR \fIsocket\fR, \fBstruct sockaddr *restrict\fR \fIaddress\fR, - \fBsocklen_t *restrict\fR \fIaddress_len\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBgetsockname()\fR function retrieves the locally-bound name of the -specified socket, stores this address in the \fBsockaddr\fR structure pointed -to by the \fIaddress\fR argument, and stores the length of this address in the -object pointed to by the \fIaddress_len\fR argument. -.sp -.LP -If the actual length of the address is greater than the length of the supplied -\fBsockaddr\fR structure, the stored address will be truncated. -.sp -.LP -If the socket has not been bound to a local name, the value stored in the -object pointed to by \fIaddress\fR is unspecified. -.SH RETURN VALUES -.LP -Upon successful completion, 0 is returned, the \fIaddress\fR argument points to -the address of the socket, and the \fIaddress_len\fR argument points to the -length of the address. Otherwise, \(mi1 is returned and \fBerrno\fR is set to -indicate the error. -.SH ERRORS -.LP -The \fBgetsockname()\fR function will fail: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 14n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 14n -The \fIaddress\fR or \fIaddress_len\fR parameter can not be accessed or -written. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 14n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 14n -The operation is not supported for this socket's protocol. -.RE - -.sp -.LP -The \fBgetsockname()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 11n -The socket has been shut down. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to complete the call. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBsockaddr\fR(3SOCKET), -\fBaccept\fR(3XNET), \fBbind\fR(3XNET), \fBgetpeername\fR(3XNET), -\fBsocket\fR(3XNET) \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/getsockopt.3xnet b/usr/src/man/man3xnet/getsockopt.3xnet deleted file mode 100644 index 8f51c12d5d..0000000000 --- a/usr/src/man/man3xnet/getsockopt.3xnet +++ /dev/null @@ -1,375 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH GETSOCKOPT 3XNET "Jan 21, 2007" -.SH NAME -getsockopt \- get the socket options -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] -#include - -\fBint\fR \fBgetsockopt\fR(\fBint\fR \fIsocket\fR, \fBint\fR \fIlevel\fR, \fBint\fR \fIoption_name\fR, - \fBvoid *restrict\fR \fIoption_value\fR, \fBsocklen_t *restrict\fR \fIoption_len\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBgetsockopt()\fR function retrieves the value for the option specified by -the \fIoption_name\fR argument for the socket specified by the \fIsocket\fR -argument. If the size of the option value is greater than \fIoption_len\fR, the -value stored in the object pointed to by the \fIoption_value\fR argument will -be silently truncated. Otherwise, the object pointed to by the \fIoption_len\fR -argument will be modified to indicate the actual length of the value. -.sp -.LP -The \fIlevel\fR argument specifies the protocol level at which the option -resides. To retrieve options at the socket level, specify the \fIlevel\fR -argument as \fBSOL_SOCKET\fR. To retrieve options at other levels, supply the -appropriate protocol number for the protocol controlling the option. For -example, to indicate that an option will be interpreted by the \fBTCP\fR -(Transport Control Protocol), set \fIlevel\fR to the protocol number of -\fBTCP\fR, as defined in the <\fBnetinet/in.h\fR> header, or as determined by -using \fBgetprotobyname\fR(3XNET) function. -.sp -.LP -The socket in use might require the process to have appropriate privileges to -use the \fBgetsockopt()\fR function. -.sp -.LP -The \fIoption_name\fR argument specifies a single option to be retrieved. It -can be one of the following values defined in \fB\fR: -.sp -.ne 2 -.na -\fB\fBSO_DEBUG\fR\fR -.ad -.RS 17n -Reports whether debugging information is being recorded. This option stores an -\fBint\fR value. This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_ACCEPTCONN\fR\fR -.ad -.RS 17n -Reports whether socket listening is enabled. This option stores an \fBint\fR -value. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_BROADCAST\fR\fR -.ad -.RS 17n -Reports whether transmission of broadcast messages is supported, if this is -supported by the protocol. This option stores an \fBint\fR value. This is a -boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_REUSEADDR\fR\fR -.ad -.RS 17n -Reports whether the rules used in validating addresses supplied to -\fBbind\fR(3XNET) should allow reuse of local addresses, if this is supported -by the protocol. This option stores an \fBint\fR value. This is a boolean -option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_KEEPALIVE\fR\fR -.ad -.RS 17n -Reports whether connections are kept active with periodic transmission of -messages, if this is supported by the protocol. -.sp -If the connected socket fails to respond to these messages, the connection is -broken and threads writing to that socket are notified with a \fBSIGPIPE\fR -signal. This option stores an \fBint\fR value. -.sp -This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_LINGER\fR\fR -.ad -.RS 17n -Reports whether the socket lingers on \fBclose\fR(2) if data is present. If -\fBSO_LINGER\fR is set, the system blocks the process during \fBclose\fR(2) -until it can transmit the data or until the end of the interval indicated by -the \fBl_linger\fR member, whichever comes first. If \fBSO_LINGER\fR is not -specified, and \fBclose\fR(2) is issued, the system handles the call in a way -that allows the process to continue as quickly as possible. This option stores -a \fBlinger\fR structure. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_OOBINLINE\fR\fR -.ad -.RS 17n -Reports whether the socket leaves received out-of-band data (data marked -urgent) in line. This option stores an \fBint\fR value. This is a boolean -option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_SNDBUF\fR\fR -.ad -.RS 17n -Reports send buffer size information. This option stores an \fBint\fR value. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_RCVBUF\fR\fR -.ad -.RS 17n -Reports receive buffer size information. This option stores an \fBint\fR value. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_ERROR\fR\fR -.ad -.RS 17n -Reports information about error status and clears it. This option stores an -\fBint\fR value. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_TYPE\fR\fR -.ad -.RS 17n -Reports the socket type. This option stores an \fBint\fR value. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_DONTROUTE\fR\fR -.ad -.RS 17n -Reports whether outgoing messages bypass the standard routing facilities. The -destination must be on a directly-connected network, and messages are directed -to the appropriate network interface according to the destination address. The -effect, if any, of this option depends on what protocol is in use. This option -stores an \fBint\fR value. This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_MAC_EXEMPT\fR\fR -.ad -.RS 17n -Gets the mandatory access control status of the socket. A socket that has this -option enabled can communicate with an unlabeled peer if the socket is in the -global zone or has a label that dominates the default label of the peer. -Otherwise, the socket must have a label that is equal to the default label of -the unlabeled peer. \fB\fR\fBSO_MAC_EXEMPT\fR is a boolean option that is -available only when the system is configured with Trusted Extensions. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_ALLZONES\fR\fR -.ad -.RS 17n -Bypasses zone boundaries (privileged). This option stores an \fBint\fR value. -This is a boolean option. -.sp -The \fBSO_ALLZONES\fR option can be used to bypass zone boundaries between -shared-IP zones. Normally, the system prevents a socket from being bound to an -address that is not assigned to the current zone. It also prevents a socket -that is bound to a wildcard address from receiving traffic for other zones. -However, some daemons which run in the global zone might need to send and -receive traffic using addresses that belong to other shared-IP zones. If set -before a socket is bound, \fBSO_ALLZONES\fR causes the socket to ignore zone -boundaries between shared-IP zones and permits the socket to be bound to any -address assigned to the shared-IP zones. If the socket is bound to a wildcard -address, it receives traffic intended for all shared-IP zones and behaves as if -an equivalent socket were bound in each active shared-IP zone. Applications -that use the \fBSO_ALLZONES\fR option to initiate connections or send datagram -traffic should specify the source address for outbound traffic by binding to a -specific address. There is no effect from setting this option in an -exclusive-IP zone. Setting this option requires the \fBsys_net_config\fR -privilege. See \fBzones\fR(5). -.RE - -.sp -.ne 2 -.na -\fB\fBSO_DOMAIN\fR\fR -.ad -.RS 17n -get the domain used in the socket (get only) -.RE - -.sp -.ne 2 -.na -\fB\fBSO_PROTOTYPE\fR\fR -.ad -.RS 17n -for socket in domains \fBAF_INET\fR and \fBAF_INET6\fR, get the underlying -protocol number used in the socket. For socket in domain \fBAF_ROUTE\fR, get -the address family used in the socket. -.RE - -.sp -.LP -For boolean options, a zero value indicates that the option is disabled and a -non-zero value indicates that the option is enabled. -.sp -.LP -Options at other protocol levels vary in format and name. -.sp -.LP -The socket in use may require the process to have appropriate privileges to use -the \fBgetsockopt()\fR function. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, \fBgetsockopt()\fR returns \fB0\fR. Otherwise, -\fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBgetsockopt()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 15n -The \fIoption_value\fR or \fIoption_len\fR parameter can not be accessed or -written. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 15n -The specified option is invalid at the specified socket level. -.RE - -.sp -.ne 2 -.na -\fB\fBENOPROTOOPT\fR\fR -.ad -.RS 15n -The option is not supported by the protocol. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.LP -The \fBgetsockopt()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 11n -The calling process does not have the appropriate privileges. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 11n -The socket has been shut down. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources are available in the system to complete the call. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBclose\fR(2), \fBbind\fR(3XNET), \fBendprotoent\fR(3XNET), -\fBsetsockopt\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR, -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/listen.3xnet b/usr/src/man/man3xnet/listen.3xnet deleted file mode 100644 index 2dcb9f91bb..0000000000 --- a/usr/src/man/man3xnet/listen.3xnet +++ /dev/null @@ -1,156 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH LISTEN 3XNET "Jun 10, 2002" -.SH NAME -listen \- listen for socket connections and limit the queue of incoming -connections -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBlisten\fR(\fBint\fR \fIsocket\fR, \fBint\fR \fIbacklog\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBlisten()\fR function marks a connection-mode socket, specified by the -\fIsocket\fR argument, as accepting connections, and limits the number of -outstanding connections in the socket's listen queue to the value specified by -the \fIbacklog\fR argument. -.sp -.LP -If \fBlisten()\fR is called with a \fIbacklog\fR argument value that is less -than 0, the function sets the length of the socket's listen queue to 0. -.sp -.LP -The implementation may include incomplete connections in the queue subject to -the queue limit. The implementation may also increase the specified queue limit -internally if it includes such incomplete connections in the queue subject to -this limit. -.sp -.LP -Implementations may limit the length of the socket's listen queue. If -\fIbacklog\fR exceeds the implementation-dependent maximum queue length, the -length of the socket's listen queue will be set to the maximum supported value. -.sp -.LP -The socket in use may require the process to have appropriate privileges to use -the \fBlisten()\fR function. -.SH RETURN VALUES -.sp -.LP -Upon successful completions, \fBlisten()\fR returns 0. Otherwise, \(mi1 is -returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBlisten()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEDESTADDRREQ\fR\fR -.ad -.RS 16n -The socket is not bound to a local address, and the protocol does not support -listening on an unbound socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The \fIsocket\fR is already connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 16n -The socket protocol does not support \fBlisten()\fR. -.RE - -.sp -.LP -The \fBlisten()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 11n -The calling process does not have the appropriate privileges. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 11n -The \fIsocket\fR has been shut down. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources are available in the system to complete the call. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBaccept\fR(3XNET), \fBconnect\fR(3XNET), \fBsocket\fR(3XNET), -\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/recv.3xnet b/usr/src/man/man3xnet/recv.3xnet deleted file mode 100644 index 9622c56bd5..0000000000 --- a/usr/src/man/man3xnet/recv.3xnet +++ /dev/null @@ -1,299 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH RECV 3XNET "Dec 03, 2014" -.SH NAME -recv \- receive a message from a connected socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBssize_t\fR \fBrecv\fR(\fBint\fR \fIsocket\fR, \fBvoid *\fR\fIbuffer\fR, \fBsize_t\fR \fIlength\fR, \fBint\fR \fIflags\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBrecv()\fR function receives a message from a connection-mode or -connectionless-mode socket. It is normally used with connected sockets because -it does not permit the application to retrieve the source address of received -data. The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 10n -Specifies the socket file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fIbuffer\fR\fR -.ad -.RS 10n -Points to a buffer where the message should be stored. -.RE - -.sp -.ne 2 -.na -\fB\fIlength\fR\fR -.ad -.RS 10n -Specifies the length in bytes of the buffer pointed to by the \fIbuffer\fR -argument. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 10n -Specifies the type of message reception. Values of this argument are formed by -logically OR'ing zero or more of the following values: -.sp -.ne 2 -.na -\fBMSG_PEEK\fR -.ad -.RS 15n -Peeks at an incoming message. The data is treated as unread and the next -\fBrecv()\fR or similar function will still return this data. -.RE - -.sp -.ne 2 -.na -\fBMSG_OOB\fR -.ad -.RS 15n -Requests out-of-band data. The significance and semantics of out-of-band data -are protocol-specific. -.RE - -.sp -.ne 2 -.na -\fBMSG_WAITALL\fR -.ad -.RS 15n -Requests that the function block until the full amount of data requested can be -returned. The function may return a smaller amount of data if a signal is -caught, if the connection is terminated, if \fBMSG_PEEK\fR was specified, or -if an error is pending for the socket. -.RE - -.RE - -.sp -.LP -The \fBrecv()\fR function returns the length of the message written to the -buffer pointed to by the \fIbuffer\fR argument. For message-based sockets such -as \fBSOCK_DGRAM\fR and \fBSOCK_SEQPACKET\fR, the entire message must be read -in a single operation. If a message is too long to fit in the supplied buffer, -and \fBMSG_PEEK\fR is not set in the \fIflags\fR argument, the excess bytes are -discarded. For stream-based sockets such as \fBSOCK_STREAM\fR, message -boundaries are ignored. In this case, data is returned to the user as soon as -it becomes available, and no data is discarded. -.sp -.LP -If the \fBMSG_WAITALL\fR flag is not set, data will be returned only up to the -end of the first message. -.sp -.LP -If no messages are available at the socket and \fBO_NONBLOCK\fR is not set on -the socket's file descriptor, \fBrecv()\fR blocks until a message arrives. If -no messages are available at the socket and \fBO_NONBLOCK\fR is set on the -socket's file descriptor, \fBrecv()\fR fails and sets \fBerrno\fR to -\fBEAGAIN\fR or \fBEWOULDBLOCK\fR. -.SH USAGE -.LP -The \fBrecv()\fR function is identical to \fBrecvfrom\fR(3XNET) with a zero -\fIaddress_len\fR argument, and to \fBread()\fR if no flags are used. -.sp -.LP -The \fBselect\fR(3C) and \fBpoll\fR(2) functions can be used to determine when -data is available to be received. -.SH RETURN VALUES -.LP -Upon successful completion, \fBrecv()\fR returns the length of the message in -bytes. If no messages are available to be received and the peer has performed -an orderly shutdown, \fBrecv()\fR returns 0. Otherwise, -1 is returned and -\fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBrecv()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR \fR -.ad -.br -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 15n -The socket's file descriptor is marked \fBO_NONBLOCK\fR and no data is waiting -to be received; or \fBMSG_OOB\fR is set and no out-of-band data is available -and either the socket's file descriptor is marked \fBO_NONBLOCK\fR or the -socket does not support blocking to await out-of-band data. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument refers to a connection oriented socket and the -connection was forcibly closed by the peer and is no longer valid. I/O can no -longer be performed to \fIfiledes\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 15n -The \fIbuffer\fR parameter can not be accessed or written. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 15n -The \fBrecv()\fR function was interrupted by a signal that was caught, before -any data was available. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 15n -The \fBMSG_OOB\fR flag is set and no out-of-band data is available. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 15n -A receive is attempted on a connection-mode socket that is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 15n -The specified flags are not supported for this socket type or protocol. -.RE - -.sp -.ne 2 -.na -\fB\fBETIMEDOUT\fR\fR -.ad -.RS 15n -The connection timed out during connection establishment, or due to a -transmission timeout on active connection. -.RE - -.sp -.LP -The \fBrecv()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 11n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 11n -Insufficient memory was available to fulfill the request. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBpoll\fR(2), \fBrecvmsg\fR(3XNET), \fBrecvfrom\fR(3XNET), \fBselect\fR(3C), -\fBsend\fR(3XNET), \fBsendmsg\fR(3XNET), \fBsendto\fR(3XNET), -\fBshutdown\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/recvfrom.3xnet b/usr/src/man/man3xnet/recvfrom.3xnet deleted file mode 100644 index 9a1af7536b..0000000000 --- a/usr/src/man/man3xnet/recvfrom.3xnet +++ /dev/null @@ -1,337 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH RECVFROM 3XNET "April 9, 2016" -.SH NAME -recvfrom \- receive a message from a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBssize_t\fR \fBrecvfrom\fR(\fBint\fR \fIsocket\fR, \fBvoid *restrict\fR \fIbuffer\fR, \fBsize_t\fR \fIlength\fR, - \fBint\fR \fIflags\fR, \fBstruct sockaddr *restrict\fR \fIaddress\fR, - \fBsocklen_t *restrict\fR \fIaddress_len\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBrecvfrom()\fR function receives a message from a connection-mode or -connectionless-mode socket. It is normally used with connectionless-mode -sockets because it permits the application to retrieve the source address of -received data. -.sp -.LP -The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 15n -Specifies the socket file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fIbuffer\fR\fR -.ad -.RS 15n -Points to the buffer where the message should be stored. -.RE - -.sp -.ne 2 -.na -\fB\fIlength\fR\fR -.ad -.RS 15n -Specifies the length in bytes of the buffer pointed to by the \fIbuffer\fR -argument. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 15n -Specifies the type of message reception. Values of this argument are formed by -logically OR'ing zero or more of the following values: -.sp -.ne 2 -.na -\fBMSG_PEEK\fR -.ad -.RS 15n -Peeks at an incoming message. The data is treated as unread and the next -\fBrecvfrom()\fR or similar function will still return this data. -.RE - -.sp -.ne 2 -.na -\fBMSG_OOB\fR -.ad -.RS 15n -Requests out-of-band data. The significance and semantics of out-of-band data -are protocol-specific. -.RE - -.sp -.ne 2 -.na -\fBMSG_WAITALL\fR -.ad -.RS 15n -Requests that the function block until the full amount of data requested can be -returned. The function may return a smaller amount of data if a signal is -caught, if the connection is terminated, if MSG_PEEK was specified, or if an -error is pending for the socket. -.RE - -.RE - -.sp -.ne 2 -.na -\fB\fIaddress\fR\fR -.ad -.RS 15n -A null pointer, or points to a \fBsockaddr\fR structure in which the sending -address is to be stored. The length and format of the address depend on the -address family of the socket. -.RE - -.sp -.ne 2 -.na -\fB\fIaddress_len\fR\fR -.ad -.RS 15n -Specifies the length of the \fBsockaddr\fR structure pointed to by the -\fIaddress\fR argument. -.RE - -.sp -.LP -The \fBrecvfrom()\fR function returns the length of the message written to the -buffer pointed to by the \fIbuffer\fR argument. For message-based sockets such -as \fBSOCK_DGRAM\fR and \fBSOCK_SEQPACKET\fR, the entire message must be read -in a single operation. If a message is too long to fit in the supplied buffer, -and \fBMSG_PEEK\fR is not set in the \fIflags\fR argument, the excess bytes are -discarded. For stream-based sockets such as \fBSOCK_STREAM\fR, message -boundaries are ignored. In this case, data is returned to the user as soon as -it becomes available, and no data is discarded. -.sp -.LP -If the \fBMSG_WAITALL\fR flag is not set, data will be returned only up to the -end of the first message. -.sp -.LP -Not all protocols provide the source address for messages. If the -\fIaddress\fR argument is not a null pointer and the protocol provides the -source address of messages, the source address of the received message is -stored in the \fBsockaddr\fR structure pointed to by the \fIaddress\fR -argument, and the length of this address is stored in the object pointed to by -the \fIaddress_len\fR argument. -.sp -.LP -If the actual length of the address is greater than the length of the supplied -\fBsockaddr\fR structure, the stored address will be truncated. -.sp -.LP -If the \fIaddress\fR argument is not a null pointer and the protocol does not -provide the source address of messages, then the value stored in the object -pointed to by \fIaddress\fR is unspecified. -.sp -.LP -If no messages are available at the socket and \fBO_NONBLOCK\fR is not set on -the socket's file descriptor, \fBrecvfrom()\fR blocks until a message arrives. -If no messages are available at the socket and \fBO_NONBLOCK\fR is set on the -socket's file descriptor, \fBrecvfrom()\fR fails and sets \fBerrno\fR to -\fBEAGAIN\fR or \fBEWOULDBLOCK\fR. -.SH USAGE -.LP -The \fBselect\fR(3C) and \fBpoll\fR(2) functions can be used to determine when -data is available to be received. -.SH RETURN VALUES -.LP -Upon successful completion, \fBrecvfrom()\fR returns the length of the message -in bytes. If no messages are available to be received and the peer has -performed an orderly shutdown, \fBrecvfrom()\fR returns 0. Otherwise the -function returns \(mi1 and sets \fBerrno\fR to indicate the error. -.SH ERRORS -.LP -The \fBrecvfrom()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR\fR -.ad -.br -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 15n -The socket's file descriptor is marked \fBO_NONBLOCK\fR and no data is waiting -to be received, or \fBMSG_OOB\fR is set and no out-of-band data is available -and either the socket's file descriptor is marked \fBO_NONBLOCK\fR or the -socket does not support blocking to await out-of-band data. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 15n -A connection was forcibly closed by a peer. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 15n -The \fIbuffer\fR, \fIaddress\fR or \fIaddress_len\fR parameter can not be -accessed or written. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 15n -A signal interrupted \fBrecvfrom()\fR before any data was available. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 15n -The \fBMSG_OOB\fR flag is set and no out-of-band data is available. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 15n -A receive is attempted on a connection-mode socket that is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 15n -The specified flags are not supported for this socket type. -.RE - -.sp -.ne 2 -.na -\fB\fBETIMEDOUT\fR\fR -.ad -.RS 15n -The connection timed out during connection establishment, or due to a -transmission timeout on active connection. -.RE - -.sp -.LP -The \fBrecvfrom()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 11n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 11n -Insufficient memory was available to fulfill the request. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBpoll\fR(2), \fBsockaddr\fR(3SOCKET), -\fBrecv\fR(3XNET), \fBrecvmsg\fR(3XNET), \fBselect\fR(3C) -\fBsend\fR(3XNET), \fBsendmsg\fR(3XNET), \fBsendto\fR(3XNET), -\fBshutdown\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/recvmsg.3xnet b/usr/src/man/man3xnet/recvmsg.3xnet deleted file mode 100644 index b2ac467817..0000000000 --- a/usr/src/man/man3xnet/recvmsg.3xnet +++ /dev/null @@ -1,389 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH RECVMSG 3XNET "Feb 27, 2006" -.SH NAME -recvmsg \- receive a message from a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBssize_t\fR \fBrecvmsg\fR(\fBint\fR \fIsocket\fR, \fBstruct msghdr *\fR\fImessage\fR, \fBint\fR \fIflags\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBrecvmsg()\fR function receives a message from a connection-mode or -connectionless-mode socket. It is normally used with connectionless-mode -sockets because it permits the application to retrieve the source address of -received data. -.sp -.LP -The \fBrecvmsg()\fR function receives messages from unconnected or connected -sockets and returns the length of the message. -.sp -.LP -The \fBrecvmsg()\fR function returns the total length of the message. For -message-based sockets such as \fBSOCK_DGRAM\fR and \fBSOCK_SEQPACKET\fR, the -entire message must be read in a single operation. If a message is too long to -fit in the supplied buffers, and \fBMSG_PEEK\fR is not set in the \fIflags\fR -argument, the excess bytes are discarded, and \fBMSG_TRUNC\fR is set in the -\fBmsg_flags\fR member of the \fBmsghdr\fR structure. For stream-based sockets -such as \fBSOCK_STREAM\fR, message boundaries are ignored. In this case, data -is returned to the user as soon as it becomes available, and no data is -discarded. -.sp -.LP -If the \fBMSG_WAITALL\fR flag is not set, data will be returned only up to the -end of the first message. -.sp -.LP -If no messages are available at the socket, and \fBO_NONBLOCK\fR is not set on -the socket's file descriptor, \fBrecvmsg()\fR blocks until a message arrives. -If no messages are available at the socket and \fBO_NONBLOCK\fR is set on the -socket's file descriptor, the \fBrecvmsg()\fR function fails and sets -\fBerrno\fR to \fBEAGAIN\fR or \fBEWOULDBLOCK\fR. -.sp -.LP -In the \fBmsghdr\fR structure, defined in \fBsocket.h\fR(3HEAD), the -\fBmsg_name\fR and \fBmsg_namelen\fR members specify the source address if the -socket is unconnected. If the socket is connected, the \fBmsg_name\fR and -\fBmsg_namelen\fR members are ignored. The \fBmsg_name\fR member may be a null -pointer if no names are desired or required. -.sp -.LP -The \fBmsg_control\fR and \fBmsg_controllen\fR members specify a buffer to -receive ancillary data sent along with a message. Ancillary data consists of a -sequence of pairs. Each pair is composed of a \fBcmsghdr\fR structure followed -by a data array. The \fBcmsghdr\fR structure, defined in \fBsocket.h\fR(3HEAD), -contains descriptive information which allows an application to correctly parse -data. The data array contains the ancillary data message. -.sp -.LP -If ancillary data is not transferred, \fBmsg_control\fR is set to \fBNULL\fR -and \fBmsg_controllen\fR is set to \fB0\fR. -.sp -.LP -The \fBmsg_iov\fR and \fBmsg_iovlen\fR fields of the \fBmsghdr\fR structure are -used to specify where the received data will be stored. \fBmsg_iov\fR points to -an array of \fBiovec\fR structures. The \fBmsg_iovlen\fR must be set to the -dimension of this array. In each \fBiovec\fR structure, the \fBiov_base\fR -field specifies a storage area and the \fBiov_len\fR field gives its size in -bytes. Each storage area indicated by \fBmsg_iov\fR is filled with received -data in turn until all of the received data is stored or all of the areas have -been filled. -.sp -.LP -If the \fBSO_TIMESTAMP\fR option has been enabled through \fBsetsockopt()\fR, -then a struct \fBtimeval\fR is returned following the \fBcmsghdr\fR, and the -\fBcmsg_len\fR field of the \fBcmsghdr\fR indicates the size of the struct -\fBtimeval\fR. -.sp -.LP -On successful completion, the \fBmsg_flags\fR member of the message header is -the bitwise-inclusive OR of all of the following flags that indicate conditions -detected for the received message: -.sp -.ne 2 -.na -\fB\fBMSG_EOR\fR\fR -.ad -.RS 14n -End of record was received (if supported by the protocol). -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_OOB\fR\fR -.ad -.RS 14n -Out-of-band data was received. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_TRUNC\fR\fR -.ad -.RS 14n -Normal data was truncated. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_CTRUNC\fR\fR -.ad -.RS 14n -Control data was truncated. -.RE - -.SH PARAMETERS -.sp -.LP -The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 11n -Specifies the socket file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fImessage\fR\fR -.ad -.RS 11n -Points to a \fBmsghdr\fR structure, containing both the buffer to store the -source address and the buffers for the incoming message. The length and format -of the address depend on the address family of the socket. The \fBmsg_flags\fR -member is ignored on input, but may contain meaningful values on output. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 11n -Specifies the type of message reception. Values of this argument are formed by -logically OR'ing zero or more of the following values: -.sp -.ne 2 -.na -\fB\fBMSG_OOB\fR\fR -.ad -.RS 15n -Requests out-of-band data. The significance and semantics of out-of-band data -are protocol-specific. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_PEEK\fR\fR -.ad -.RS 15n -Peeks at the incoming message. -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_WAITALL\fR\fR -.ad -.RS 15n -Requests that the function block until the full amount of data requested can be -returned. The function may return a smaller amount of data if a signal is -caught, if the connection is terminated, if \fBMSG_PEEK\fR was specified, or if -an error is pending for the socket. -.RE - -.RE - -.SH USAGE -.sp -.LP -The \fBselect\fR(3C) and \fBpoll\fR(2) functions can be used to determine when -data is available to be received. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, \fBrecvmsg()\fR returns the length of the message -in bytes. If no messages are available to be received and the peer has -performed an orderly shutdown, \fBrecvmsg()\fR returns \fB0\fR. Otherwise, -\fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBrecvmsg()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR\fR -.ad -.br -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 15n -The socket's file descriptor is marked \fBO_NONBLOCK\fR and no data is waiting -to be received; or \fBMSG_OOB\fR is set and no out-of-band data is available -and either the socket's file descriptor is marked \fBO_NONBLOCK\fR or the -socket does not support blocking to await out-of-band data. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument is not a valid open file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 15n -A connection was forcibly closed by a peer. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 15n -The \fImessage\fR parameter, or storage pointed to by the \fImsg_name\fR, -\fImsg_control\fR or \fImsg_iov\fR fields of the \fImessage\fR parameter, or -storage pointed to by the \fBiovec\fR structures pointed to by the -\fImsg_iov\fR field can not be accessed or written. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 15n -This function was interrupted by a signal before any data was available. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 15n -The sum of the \fBiov_len\fR values overflows an \fBssize_t\fR. or the MSG_OOB -flag is set and no out-of-band data is available. -.RE - -.sp -.ne 2 -.na -\fB\fBEMSGSIZE\fR\fR -.ad -.RS 15n -The \fBmsg_iovlen\fR member of the \fBmsghdr\fR structure pointed to by -\fImessage\fR is less than or equal to 0, or is greater than \fBIOV_MAX\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 15n -A receive is attempted on a connection-mode socket that is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 15n -The specified flags are not supported for this socket type. -.RE - -.sp -.ne 2 -.na -\fB\fBETIMEDOUT\fR\fR -.ad -.RS 15n -The connection timed out during connection establishment, or due to a -transmission timeout on active connection. -.RE - -.sp -.LP -The \fBrecvmsg()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 11n -An \fBIO\fR error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 11n -Insufficient memory was available to fulfill the request. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBpoll\fR(2), \fBrecv\fR(3XNET), \fBrecvfrom\fR(3XNET), \fBselect\fR(3C), -\fBsend\fR(3XNET), \fBsendmsg\fR(3XNET), \fBsendto\fR(3XNET), -\fBsetsockopt\fR(3XNET), \fBshutdown\fR(3XNET), \fBsocket\fR(3XNET), -\fBsocket.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/send.3xnet b/usr/src/man/man3xnet/send.3xnet deleted file mode 100644 index 6877bd7bd8..0000000000 --- a/usr/src/man/man3xnet/send.3xnet +++ /dev/null @@ -1,307 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved. Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SEND 3XNET "Dec 3, 2014" -.SH NAME -send \- send a message on a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBssize_t\fR \fBsend\fR(\fBint\fR \fIsocket\fR, \fBconst void *\fR\fIbuffer\fR, \fBsize_t\fR \fIlength\fR, \fBint flags\fR); -.fi - -.SH PARAMETERS -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 10n -Specifies the socket file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fIbuffer\fR\fR -.ad -.RS 10n -Points to the buffer containing the message to send. -.RE - -.sp -.ne 2 -.na -\fB\fIlength\fR\fR -.ad -.RS 10n -Specifies the length of the message in bytes. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 10n -Specifies the type of message transmission. Values of this argument are formed -by logically OR'ing zero or more of the following flags: -.sp -.ne 2 -.na -\fB\fBMSG_EOR\fR\fR -.ad -.RS 11n -Terminates a record (if supported by the protocol) -.RE - -.sp -.ne 2 -.na -\fB\fBMSG_OOB\fR\fR -.ad -.RS 11n -Sends out-of-band data on sockets that support out-of-band communications. The -significance and semantics of out-of-band data are protocol-specific. -.RE - -.RE - -.SH DESCRIPTION -.LP -The \fBsend()\fR function initiates transmission of a message from the -specified socket to its peer. The \fBsend()\fR function sends a message only -when the socket is connected (including when the peer of a connectionless -socket has been set via \fBconnect\fR(3XNET)). -.sp -.LP -The length of the message to be sent is specified by the \fIlength\fR argument. -If the message is too long to pass through the underlying protocol, -\fBsend()\fR fails and no data is transmitted. -.sp -.LP -Successful completion of a call to \fBsend()\fR does not guarantee delivery of -the message. A return value of \(mi1 indicates only locally-detected errors. -.sp -.LP -If space is not available at the sending socket to hold the message to be -transmitted and the socket file descriptor does not have \fBO_NONBLOCK\fR set, -\fBsend()\fR blocks until space is available. If space is not available at the -sending socket to hold the message to be transmitted and the socket file -descriptor does have \fBO_NONBLOCK\fR set, \fBsend()\fR will fail. The -\fBselect\fR(3C) and \fBpoll\fR(2) functions can be used to determine when it -is possible to send more data. -.sp -.LP -The socket in use may require the process to have appropriate privileges to use -the \fBsend()\fR function. -.SH USAGE -.LP -The \fBsend()\fR function is identical to \fBsendto\fR(3XNET) with a null -pointer \fIdest_len\fR argument, and to \fBwrite()\fR if no flags are used. -.SH RETURN VALUES -.LP -Upon successful completion, \fBsend()\fR returns the number of bytes sent. -Otherwise, \(mi1 is returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBsend()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR \fR -.ad -.br -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 16n -The socket's file descriptor is marked \fBO_NONBLOCK\fR and the requested -operation would block. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument refers to a connection oriented socket and the -connection was forcibly closed by the peer and is no longer valid. I/O can no -longer be performed to \fIfiledes\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEDESTADDRREQ\fR\fR -.ad -.RS 16n -The socket is not connection-mode and no peer address is set. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 16n -The \fIbuffer\fR parameter can not be accessed. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 16n -A signal interrupted \fBsend()\fR before any data was transmitted. -.RE - -.sp -.ne 2 -.na -\fB\fBEMSGSIZE\fR\fR -.ad -.RS 16n -The message is too large be sent all at once, as the socket requires. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 16n -The socket is not connected or otherwise has not had the peer prespecified. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is associated with a socket that does not support one -or more of the values set in \fIflags\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEPIPE\fR\fR -.ad -.RS 16n -The socket is shut down for writing, or the socket is connection-mode and is no -longer connected. In the latter case, and if the socket is of type -\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread. -.RE - -.sp -.LP -The \fBsend()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 15n -The calling process does not have the appropriate privileges. -.RE - -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 15n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBENETDOWN\fR\fR -.ad -.RS 15n -The local interface used to reach the destination is down. -.RE - -.sp -.ne 2 -.na -\fB\fBENETUNREACH\fR\fR -.ad -.RS 15n -No route to the network is present. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 15n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 15n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBconnect\fR(3XNET), \fBgetsockopt\fR(3XNET), \fBpoll\fR(2), -\fBrecv\fR(3XNET), \fBrecvfrom\fR(3XNET), \fBrecvmsg\fR(3XNET), -\fBselect\fR(3C), \fBsendmsg\fR(3XNET), \fBsendto\fR(3XNET), -\fBsetsockopt\fR(3XNET), \fBshutdown\fR(3XNET), \fBsocket\fR(3XNET), -\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/sendmsg.3xnet b/usr/src/man/man3xnet/sendmsg.3xnet deleted file mode 100644 index 5860ee8277..0000000000 --- a/usr/src/man/man3xnet/sendmsg.3xnet +++ /dev/null @@ -1,438 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SENDMSG 3XNET "Nov 1, 2003" -.SH NAME -sendmsg \- send a message on a socket using a message structure -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBssize_t\fR \fBsendmsg\fR(\fBint\fR \fIsocket\fR, \fBconst struct msghdr *\fR\fImessage\fR, \fBint\fR \fIflags\fR); -.fi - -.SH PARAMETERS -.sp -.LP -The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 11n -Specifies the socket file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fImessage\fR\fR -.ad -.RS 11n -Points to a \fBmsghdr\fR structure, containing both the destination address and -the buffers for the outgoing message. The length and format of the address -depend on the address family of the socket. The \fBmsg_flags\fR member is -ignored. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 11n -Specifies the type of message transmission. The application may specify 0 or -the following flag: -.sp -.ne 2 -.na -\fBMSG_EOR\fR -.ad -.RS 11n -Terminates a record (if supported by the protocol) -.RE - -.sp -.ne 2 -.na -\fBMSG_OOB\fR -.ad -.RS 11n -Sends out-of-band data on sockets that support out-of-bound data. The -significance and semantics of out-of-band data are protocol-specific. -.RE - -.RE - -.SH DESCRIPTION -.sp -.LP -The \fBsendmsg()\fR function sends a message through a connection-mode or -connectionless-mode socket. If the socket is connectionless-mode, the message -will be sent to the address specified by \fImsghdr\fR. If the socket is -connection-mode, the destination address in \fImsghdr\fR is ignored. -.sp -.LP -The \fImsg_iov\fR and \fImsg_iovlen\fR fields of message specify zero or more -buffers containing the data to be sent. \fImsg_iov\fR points to an array of -\fBiovec\fR structures; \fImsg_iovlen\fR must be set to the dimension of this -array. In each \fBiovec\fR structure, the \fIiov_base\fR field specifies a -storage area and the \fIiov_len\fR field gives its size in bytes. Some of -these sizes can be zero. The data from each storage area indicated by -\fImsg_iov\fR is sent in turn. -.sp -.LP -Successful completion of a call to \fBsendmsg()\fR does not guarantee delivery -of the message. A return value of \(mi1 indicates only locally-detected errors. -.sp -.LP -If space is not available at the sending socket to hold the message to be -transmitted and the socket file descriptor does not have \fBO_NONBLOCK\fR set, -\fBsendmsg()\fR function blocks until space is available. If space is not -available at the sending socket to hold the message to be transmitted and the -socket file descriptor does have \fBO_NONBLOCK\fR set, \fBsendmsg()\fR function -will fail. -.sp -.LP -If the socket protocol supports broadcast and the specified address is a -broadcast address for the socket protocol, \fBsendmsg()\fR will fail if the -\fBSO_BROADCAST\fR option is not set for the socket. -.sp -.LP -The socket in use may require the process to have appropriate privileges to use -the \fBsendmsg()\fR function. -.SH USAGE -.sp -.LP -The \fBselect\fR(3C) and \fBpoll\fR(2) functions can be used to determine when -it is possible to send more data. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, \fBsendmsg()\fR function returns the number of -bytes sent. Otherwise, \(mi1 is returned and \fBerrno\fR is set to indicate -the error. -.SH ERRORS -.sp -.LP -The \fBsendmsg()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR \fR -.ad -.br -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 16n -The socket's file descriptor is marked O_NONBLOCK and the requested operation -would block. -.RE - -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 16n -Addresses in the specified address family cannot be used with this socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 16n -A connection was forcibly closed by a peer. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 16n -The \fImessage\fR parameter, or storage pointed to by the \fImsg_name\fR, -\fImsg_control\fR or \fImsg_iov\fR fields of the \fImessage\fR parameter, or -storage pointed to by the \fBiovec\fR structures pointed to by the -\fImsg_iov\fR field can not be accessed. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 16n -A signal interrupted \fBsendmsg()\fR before any data was transmitted. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The sum of the \fBiov_len\fR values overflows an \fBssize_t\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEMSGSIZE\fR\fR -.ad -.RS 16n -The message is to large to be sent all at once (as the socket requires), or the -\fBmsg_iovlen\fR member of the \fBmsghdr\fR structure pointed to by -\fImessage\fR is less than 0 or is greater than \fBIOV_MAX\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 16n -The socket is connection-mode but is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument does not refer a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is associated with a socket that does not support one -or more of the values set in \fIflags\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEPIPE\fR\fR -.ad -.RS 16n -The socket is shut down for writing, or the socket is connection-mode and is no -longer connected. In the latter case, and if the socket is of type SOCK_STREAM, -the \fBSIGPIPE\fR signal is generated to the calling thread. -.RE - -.sp -.LP -If the address family of the socket is \fBAF_UNIX\fR, then \fBsendmsg()\fR will -fail if: -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 16n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBELOOP\fR\fR -.ad -.RS 16n -Too many symbolic links were encountered in translating the pathname in the -socket address. -.RE - -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -A component of a pathname exceeded \fINAME_MAX\fR characters, or an entire -pathname exceeded \fIPATH_MAX\fR characters. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 16n -A component of the pathname does not name an existing file or the pathname is -an empty string. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTDIR\fR\fR -.ad -.RS 16n -A component of the path prefix of the pathname in the socket address is not a -directory. -.RE - -.sp -.LP -The \fBsendmsg()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 16n -Search permission is denied for a component of the path prefix; or write access -to the named socket is denied. -.RE - -.sp -.ne 2 -.na -\fB\fBEDESTADDRREQ\fR\fR -.ad -.RS 16n -The socket is not connection-mode and does not have its peer address set, and -no destination address was specified. -.RE - -.sp -.ne 2 -.na -\fB\fBEHOSTUNREACH\fR\fR -.ad -.RS 16n -The destination host cannot be reached (probably because the host is down or a -remote router cannot reach it). -.RE - -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 16n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBEISCONN\fR\fR -.ad -.RS 16n -A destination address was specified and the socket is already connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENETDOWN\fR\fR -.ad -.RS 16n -The local interface used to reach the destination is down. -.RE - -.sp -.ne 2 -.na -\fB\fBENETUNREACH\fR\fR -.ad -.RS 16n -No route to the network is present. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 16n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 16n -Insufficient memory was available to fulfill the request. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 16n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.sp -.LP -If the address family of the socket is \fBAF_UNIX\fR, then \fBsendmsg()\fR may -fail if: -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -Pathname resolution of a symbolic link produced an intermediate result whose -length exceeds \fIPATH_MAX\fR. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBpoll\fR(2) \fBgetsockopt\fR(3XNET), \fBrecv\fR(3XNET), -\fBrecvfrom\fR(3XNET), \fBrecvmsg\fR(3XNET), \fBselect\fR(3C), -\fBsend\fR(3XNET), \fBsendto\fR(3XNET), \fBsetsockopt\fR(3XNET), -\fBshutdown\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/sendto.3xnet b/usr/src/man/man3xnet/sendto.3xnet deleted file mode 100644 index ebbb57539a..0000000000 --- a/usr/src/man/man3xnet/sendto.3xnet +++ /dev/null @@ -1,448 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SENDTO 3XNET "Nov 1, 2003" -.SH NAME -sendto \- send a message on a socket -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR ... ] -#include - -\fBssize_t\fR \fBsendto\fR(\fBint\fR \fIsocket\fR, \fBconst void *\fR\fImessage\fR, \fBsize_t\fR \fIlength\fR, \fBint\fR \fIflags\fR, - \fBconst struct sockaddr *\fR\fIdest_addr\fR, \fBsocklen_t\fR \fIdest_len\fR); -.fi - -.SH DESCRIPTION -.LP -The \fBsendto()\fR function sends a message through a connection-mode or -connectionless-mode socket. If the socket is connectionless-mode, the message -will be sent to the address specified by \fIdest_addr\fR. If the socket is -connection-mode, \fIdest_addr\fR is ignored. -.sp -.LP -If the socket protocol supports broadcast and the specified address is a -broadcast address for the socket protocol, \fBsendto()\fR will fail if the -\fBSO_BROADCAST\fR option is not set for the socket. -.sp -.LP -The \fIdest_addr\fR argument specifies the address of the target. The -\fIlength\fR argument specifies the length of the message. -.sp -.LP -Successful completion of a call to \fBsendto()\fR does not guarantee delivery -of the message. A return value of \fB\(mi1\fR indicates only locally-detected -errors. -.sp -.LP -If space is not available at the sending socket to hold the message to be -transmitted and the socket file descriptor does not have \fBO_NONBLOCK\fR set, -\fBsendto()\fR blocks until space is available. If space is not available at -the sending socket to hold the message to be transmitted and the socket file -descriptor does have \fBO_NONBLOCK\fR set, \fBsendto()\fR will fail. -.sp -.LP -The socket in use may require the process to have appropriate privileges to use -the \fBsendto()\fR function. -.SH PARAMETERS -.LP -The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 13n -Specifies the socket file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fImessage\fR\fR -.ad -.RS 13n -Points to a buffer containing the message to be sent. -.RE - -.sp -.ne 2 -.na -\fB\fIlength\fR\fR -.ad -.RS 13n -Specifies the size of the message in bytes. -.RE - -.sp -.ne 2 -.na -\fB\fIflags\fR\fR -.ad -.RS 13n -Specifies the type of message transmission. Values of this argument are formed -by logically OR'ing zero or more of the following flags: -.sp -.ne 2 -.na -\fBMSG_EOR\fR -.ad -.RS 11n -Terminates a record (if supported by the protocol) -.RE - -.sp -.ne 2 -.na -\fBMSG_OOB\fR -.ad -.RS 11n -Sends out-of-band data on sockets that support out-of-band data. The -significance and semantics of out-of-band data are protocol-specific. -.RE - -.RE - -.sp -.ne 2 -.na -\fB\fIdest_addr\fR\fR -.ad -.RS 13n -Points to a \fBsockaddr\fR structure containing the destination address. The -length and format of the address depend on the address family of the socket. -.RE - -.sp -.ne 2 -.na -\fB\fIdest_len\fR\fR -.ad -.RS 13n -Specifies the length of the \fBsockaddr\fR structure pointed to by the -\fIdest_addr\fR argument. -.RE - -.SH USAGE -.LP -The \fBselect\fR(3C) and \fBpoll\fR(2) functions can be used to determine when -it is possible to send more data. -.SH RETURN VALUES -.LP -Upon successful completion, \fBsendto()\fR returns the number of bytes sent. -Otherwise, \fB-1\fR is returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.LP -The \fBsendto()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 16n -Addresses in the specified address family cannot be used with this socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEAGAIN\fR\fR -.ad -.br -.na -\fB\fBEWOULDBLOCK\fR\fR -.ad -.RS 16n -The socket's file descriptor is marked \fBO_NONBLOCK\fR and the requested -operation would block. -.RE - -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBECONNRESET\fR\fR -.ad -.RS 16n -A connection was forcibly closed by a peer. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 16n -The \fImessage\fR or \fIdestaddr\fR parameter cannot be accessed. -.RE - -.sp -.ne 2 -.na -\fB\fBEINTR\fR\fR -.ad -.RS 16n -A signal interrupted \fBsendto()\fR before any data was transmitted. -.RE - -.sp -.ne 2 -.na -\fB\fBEMSGSIZE\fR\fR -.ad -.RS 16n -The message is too large to be sent all at once, as the socket requires. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 16n -The socket is connection-mode but is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 16n -The \fIsocket\fR argument is associated with a socket that does not support one -or more of the values set in \fIflags\fR. -.RE - -.sp -.ne 2 -.na -\fB\fBEPIPE\fR\fR -.ad -.RS 16n -The socket is shut down for writing, or the socket is connection-mode and is no -longer connected. In the latter case, and if the socket is of type -\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread. -.RE - -.sp -.LP -If the address family of the socket is \fBAF_UNIX\fR, then \fBsendto()\fR will -fail if: -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 16n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBELOOP\fR\fR -.ad -.RS 16n -Too many symbolic links were encountered in translating the pathname in the -socket address. -.RE - -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -A component of a pathname exceeded \fINAME_MAX\fR characters, or an entire -pathname exceeded \fIPATH_MAX\fR characters. -.RE - -.sp -.ne 2 -.na -\fB\fBENOENT\fR\fR -.ad -.RS 16n -A component of the pathname does not name an existing file or the pathname is -an empty string. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTDIR\fR\fR -.ad -.RS 16n -A component of the path prefix of the pathname in the socket address is not a -directory. -.RE - -.sp -.LP -The \fBsendto()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 16n -Search permission is denied for a component of the path prefix; or write access -to the named socket is denied. -.RE - -.sp -.ne 2 -.na -\fB\fBEDESTADDRREQ\fR\fR -.ad -.RS 16n -The socket is not connection-mode and does not have its peer address set, and -no destination address was specified. -.RE - -.sp -.ne 2 -.na -\fB\fBEHOSTUNREACH\fR\fR -.ad -.RS 16n -The destination host cannot be reached (probably because the host is down or a -remote router cannot reach it). -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 16n -The \fIdest_len\fR argument is not a valid length for the address family. -.RE - -.sp -.ne 2 -.na -\fB\fBEIO\fR\fR -.ad -.RS 16n -An I/O error occurred while reading from or writing to the file system. -.RE - -.sp -.ne 2 -.na -\fB\fBEISCONN\fR\fR -.ad -.RS 16n -A destination address was specified and the socket is already connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENETDOWN\fR\fR -.ad -.RS 16n -The local interface used to reach the destination is down. -.RE - -.sp -.ne 2 -.na -\fB\fBENETUNREACH\fR\fR -.ad -.RS 16n -No route to the network is present. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 16n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 16n -Insufficient memory was available to fulfill the request. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 16n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.sp -.LP -If the address family of the socket is \fBAF_UNIX\fR, then \fBsendto()\fR may -fail if: -.sp -.ne 2 -.na -\fB\fBENAMETOOLONG\fR\fR -.ad -.RS 16n -Pathname resolution of a symbolic link produced an intermediate result whose -length exceeds \fIPATH_MAX\fR. -.RE - -.SH ATTRIBUTES -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.LP -\fBpoll\fR(2), \fBsockaddr\fR(3SOCKET), -\fBgetsockopt\fR(3XNET), \fBrecv\fR(3XNET), -\fBrecvfrom\fR(3XNET), \fBrecvmsg\fR(3XNET), \fBselect\fR(3C), -\fBsend\fR(3XNET), \fBsendmsg\fR(3XNET), \fBsetsockopt\fR(3XNET), -\fBshutdown\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/setsockopt.3xnet b/usr/src/man/man3xnet/setsockopt.3xnet deleted file mode 100644 index 78a39060e9..0000000000 --- a/usr/src/man/man3xnet/setsockopt.3xnet +++ /dev/null @@ -1,343 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SETSOCKOPT 3XNET "Jan 21, 2007" -.SH NAME -setsockopt \- set the socket options -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] -#include - -\fBint\fR \fBsetsockopt\fR(\fBint\fR \fIsocket\fR, \fBint\fR \fIlevel\fR, \fBint\fR \fIoption_name\fR, - \fBconst void*\fR\fIoption_value\fR, \fBsocklen_t\fR \fIoption_len\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBsetsockopt()\fR function sets the option specified by the -\fIoption_name\fR argument, at the protocol level specified by the \fIlevel\fR -argument, to the value pointed to by the \fIoption_value\fR argument for the -socket associated with the file descriptor specified by the \fIsocket\fR -argument. -.sp -.LP -The \fIlevel\fR argument specifies the protocol level at which the option -resides. To set options at the socket level, specify the \fIlevel\fR argument -as \fBSOL_SOCKET\fR. To set options at other levels, supply the appropriate -protocol number for the protocol controlling the option. For example, to -indicate that an option will be interpreted by the TCP (Transport Control -Protocol), set \fIlevel\fR to the protocol number of TCP, as defined in -the<\fBnetinet/in.h\fR> header, or as determined by using -\fBgetprotobyname\fR(3XNET). -.sp -.LP -The \fIoption_name\fR argument specifies a single option to set. The -\fIoption_name\fR argument and any specified options are passed uninterpreted -to the appropriate protocol module for interpretations. The -<\fBsys/socket.h\fR> header defines the socket level options. The options are -as follow -.sp -.ne 2 -.na -\fB\fBSO_DEBUG\fR\fR -.ad -.RS 17n -Turns on recording of debugging information. This option enables or disables -debugging in the underlying protocol modules. This option takes an \fBint\fR -value. This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_BROADCAST\fR\fR -.ad -.RS 17n -Permits sending of broadcast messages, if this is supported by the protocol. -This option takes an \fBint\fR value. This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_REUSEADDR\fR\fR -.ad -.RS 17n -Specifies that the rules used in validating addresses supplied to -\fBbind\fR(3XNET) should allow reuse of local addresses, if this is supported -by the protocol. This option takes an \fBint\fR value. This is a boolean -option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_KEEPALIVE\fR\fR -.ad -.RS 17n -Keeps connections active by enabling the periodic transmission of messages, if -this is supported by the protocol. This option takes an \fBint\fR value. -.sp -If the connected socket fails to respond to these messages, the connection is -broken and threads writing to that socket are notified with a \fBSIGPIPE\fR -signal. -.sp -This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_LINGER\fR\fR -.ad -.RS 17n -Lingers on a \fBclose\fR(2) if data is present. This option controls the -action taken when unsent messages queue on a socket and \fBclose\fR(2) is -performed. If \fBSO_LINGER\fR is set, the system blocks the process during -\fBclose\fR(2) until it can transmit the data or until the time expires. If -\fBSO_LINGER\fR is not specified, and \fBclose\fR(2) is issued, the system -handles the call in a way that allows the process to continue as quickly as -possible. This option takes a \fBlinger\fR structure, as defined in the -<\fBsys/socket.h\fR> header, to specify the state of the option and linger -interval. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_OOBINLINE\fR\fR -.ad -.RS 17n -Leaves received out-of-band data (data marked urgent) in line. This option -takes an \fBint\fR value. This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_SNDBUF\fR\fR -.ad -.RS 17n -Sets send buffer size. This option takes an \fBint\fR value. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_RCVBUF\fR\fR -.ad -.RS 17n -Sets receive buffer size. This option takes an \fBint\fR value. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_DONTROUTE\fR\fR -.ad -.RS 17n -Requests that outgoing messages bypass the standard routing facilities. The -destination must be on a directly-connected network, and messages are directed -to the appropriate network interface according to the destination address. The -effect, if any, of this option depends on what protocol is in use. This option -takes an \fBint\fR value. This is a boolean option. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_MAC_EXEMPT\fR\fR -.ad -.RS 17n -Sets the mandatory access control on the socket. A socket that has this option -enabled can communicate with an unlabeled peer if the socket is in the global -zone or has a label that dominates the default label of the peer. Otherwise, -the socket must have a label that is equal to the default label of the -unlabeled peer. \fBSO_MAC_EXEMPT\fR is a boolean option that is available only -when the system is configured with Trusted Extensions. -.RE - -.sp -.ne 2 -.na -\fB\fBSO_ALLZONES\fR\fR -.ad -.RS 17n -Bypasses zone boundaries (privileged). This option stores an \fBint\fR value. -This is a boolean option. -.sp -The \fBSO_ALLZONES\fR option can be used to bypass zone boundaries between -shared-IP zones. Normally, the system prevents a socket from being bound to an -address that is not assigned to the current zone. It also prevents a socket -that is bound to a wildcard address from receiving traffic for other zones. -However, some daemons which run in the global zone might need to send and -receive traffic using addresses that belong to other shared-IP zones. If set -before a socket is bound, \fBSO_ALLZONES\fR causes the socket to ignore zone -boundaries between shared-IP zones and permits the socket to be bound to any -address assigned to the shared-IP zones. If the socket is bound to a wildcard -address, it receives traffic intended for all shared-IP zones and behaves as if -an equivalent socket were bound in each active shared-IP zone. Applications -that use the \fBSO_ALLZONES\fR option to initiate connections or send datagram -traffic should specify the source address for outbound traffic by binding to a -specific address. There is no effect from setting this option in an -exclusive-IP zone. Setting this option requires the \fBsys_net_config\fR -privilege. See \fBzones\fR(5). -.RE - -.sp -.LP -For boolean options, \fB0\fR indicates that the option is disabled and \fB1\fR -indicates that the option is enabled. -.sp -.LP -Options at other protocol levels vary in format and name. -.SH USAGE -.sp -.LP -The \fBsetsockopt()\fR function provides an application program with the means -to control socket behavior. An application program can use \fBsetsockopt()\fR -to allocate buffer space, control timeouts, or permit socket data broadcasts. -The <\fBsys/socket.h\fR> header defines the socket-level options available to -\fBsetsockopt()\fR. -.sp -.LP -Options may exist at multiple protocol levels. The \fBSO_\fR options are always -present at the uppermost socket level. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, \fBsetsockopt()\fR returns \fB0\fR. Otherwise, -\fB-1\fR is returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBsetsockopt()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEDOM\fR\fR -.ad -.RS 15n -The send and receive timeout values are too big to fit into the timeout fields -in the socket structure. -.RE - -.sp -.ne 2 -.na -\fB\fBEFAULT\fR\fR -.ad -.RS 15n -The \fIoption_value\fR parameter can not be accessed or written. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 15n -The specified option is invalid at the specified socket level or the socket has -been shut down. -.RE - -.sp -.ne 2 -.na -\fB\fBEISCONN\fR\fR -.ad -.RS 15n -The socket is already connected, and a specified option can not be set while -the socket is connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOPROTOOPT\fR\fR -.ad -.RS 15n -The option is not supported by the protocol. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 15n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.LP -The \fBsetsockopt()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 11n -There was insufficient memory available for the operation to complete. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources are available in the system to complete the call. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBbind\fR(3XNET), \fBendprotoent\fR(3XNET), \fBgetsockopt\fR(3XNET), -\fBsocket\fR(3XNET), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/shutdown.3xnet b/usr/src/man/man3xnet/shutdown.3xnet deleted file mode 100644 index 46d3398183..0000000000 --- a/usr/src/man/man3xnet/shutdown.3xnet +++ /dev/null @@ -1,166 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions -.\" Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SHUTDOWN 3XNET "Jun 10, 2002" -.SH NAME -shutdown \- shut down socket send and receive operations -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBshutdown\fR(\fBint\fR \fIsocket\fR, \fBint\fR \fIhow\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBshutdown()\fR function disables subsequent \fBsend()\fR and -\fBreceive()\fR operations on a socket, depending on the value of the \fIhow\fR -argument. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIhow\fR\fR -.ad -.RS 10n -Specifies the type of shutdown. The values are as follows: -.sp -.ne 2 -.na -\fB\fBSHUT_RD\fR\fR -.ad -.RS 13n -Disables further receive operations. -.RE - -.sp -.ne 2 -.na -\fB\fBSHUT_WR\fR\fR -.ad -.RS 13n -Disables further send operations. -.RE - -.sp -.ne 2 -.na -\fB\fBSHUT_RDWR\fR\fR -.ad -.RS 13n -Disables further send and receive operations. -.RE - -.RE - -.sp -.ne 2 -.na -\fB\fIsocket\fR\fR -.ad -.RS 10n -Specifies the file descriptor of the socket. -.RE - -.SH RETURN VALUES -.sp -.LP -Upon successful completion, \fBshutdown()\fR returns 0. Otherwise, \(mi1 is -returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBshutdown()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 12n -The \fIsocket\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBEINVAL\fR\fR -.ad -.RS 12n -The \fIhow\fR argument is invalid. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTCONN\fR\fR -.ad -.RS 12n -The socket is not connected. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTSOCK\fR\fR -.ad -.RS 12n -The \fIsocket\fR argument does not refer to a socket. -.RE - -.sp -.LP -The \fBshutdown()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBgetsockopt\fR(3XNET), \fBrecv\fR(3XNET), \fBrecvfrom\fR(3XNET), -\fBrecvmsg\fR(3XNET), \fBselect\fR(3C), \fBsend\fR(3XNET), \fBsendto\fR(3XNET), -\fBsetsockopt\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/sockatmark.3xnet b/usr/src/man/man3xnet/sockatmark.3xnet deleted file mode 100644 index 40971eb8b1..0000000000 --- a/usr/src/man/man3xnet/sockatmark.3xnet +++ /dev/null @@ -1,104 +0,0 @@ -'\" te -.\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SOCKATMARK 3XNET "Oct 1, 2003" -.SH NAME -sockatmark \- determine whether a socket is at the out-of-band mark -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBsockatmark\fR(\fBint\fR \fIs\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBsockatmark()\fR function determines whether the socket specified by the -descriptor \fIs\fR is at the out-of-band data mark. If the protocol for the -socket supports out-of-band data by marking the stream with an out-of-band data -mark, the \fBsockatmark()\fR function returns 1 when all data preceding the -mark has been read and the out-of-band data mark is the first element in the -receive queue. The \fBsockatmark()\fR function does not remove the mark from -the stream. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, the \fBsockatmark()\fR function returns a value -indicating whether the socket is at an out-of-band data mark. If the protocol -has marked the data stream and all data preceding the mark has been read, the -return value is 1. If there is no mark, or if data precedes the mark in the -receive queue, the \fBsockatmark()\fR function returns 0. Otherwise, it returns -\(mi1 and sets \fBerrno\fR to indicate the error. -.SH ERRORS -.sp -.LP -The \fBsockatmark()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEBADF\fR\fR -.ad -.RS 10n -The \fIs\fR argument is not a valid file descriptor. -.RE - -.sp -.ne 2 -.na -\fB\fBENOTTY\fR\fR -.ad -.RS 10n -The \fIs\fR argument does not specify a descriptor for a socket. -.RE - -.SH USAGE -.sp -.LP -The use of this function between receive operations allows an application to -determine which received data precedes the out-of-band data and which follows -the out-of-band data. -.sp -.LP -There is an inherent race condition in the use of this function. On an empty -receive queue, the current read of the location might well be at the "mark", -but the system has no way of knowing that the next data segment that will -arrive from the network will carry the mark, and \fBsockatmark()\fR will return -false, and the next read operation will silently consume the mark. -.sp -.LP -Hence, this function can only be used reliably when the application already -knows that the out-of-band data has been seen by the system or that it is known -that there is data waiting to be read at the socket, either by \fBSIGURG\fR or -\fBselect\fR(3C). -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBrecv\fR(3XNET), \fBrecvmsg\fR(3XNET), \fBselect\fR(3C), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/socket.3xnet b/usr/src/man/man3xnet/socket.3xnet deleted file mode 100644 index 05dbbbc541..0000000000 --- a/usr/src/man/man3xnet/socket.3xnet +++ /dev/null @@ -1,277 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions -.\" Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SOCKET 3XNET "Jun 10, 2002" -.SH NAME -socket \- create an endpoint for communication -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBsocket\fR(\fBint\fR \fIdomain\fR, \fBint\fR \fItype\fR, \fBint\fR \fIprotocol\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBsocket()\fR function creates an unbound socket in a communications -domain, and returns a file descriptor that can be used in later function calls -that operate on sockets. -.sp -.LP -The <\fBsys/socket.h\fR> header defines at least the following values for the -\fIdomain\fR argument: -.sp -.ne 2 -.na -\fB\fBAF_UNIX\fR\fR -.ad -.RS 12n -File system pathnames. -.RE - -.sp -.ne 2 -.na -\fB\fBAF_INET\fR\fR -.ad -.RS 12n -Internet Protocol version 4 (IPv4) address. -.RE - -.sp -.ne 2 -.na -\fB\fBAF_INET6\fR\fR -.ad -.RS 12n -Internet Protocol version 6 (IPv6) address. -.RE - -.sp -.LP -The \fItype\fR argument specifies the socket type, which determines the -semantics of communication over the socket. The socket types supported by the -system are implementation-dependent. Possible socket types include: -.sp -.ne 2 -.na -\fB\fBSOCK_STREAM\fR\fR -.ad -.RS 18n -Provides sequenced, reliable, bidirectional, connection-mode byte streams, and -may provide a transmission mechanism for out-of-band data. -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_DGRAM\fR\fR -.ad -.RS 18n -Provides datagrams, which are connectionless-mode, unreliable messages of fixed -maximum length. -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_SEQPACKET\fR\fR -.ad -.RS 18n -Provides sequenced, reliable, bidirectional, connection-mode transmission path -for records. A record can be sent using one or more output operations and -received using one or more input operations, but a single operation never -transfers part of more than one record. Record boundaries are visible to the -receiver via the MSG_EOR flag. -.RE - -.sp -.LP -If the \fIprotocol\fR argument is non-zero, it must specify a protocol that is -supported by the address family. The protocols supported by the system are -implementation-dependent. -.sp -.LP -The process may need to have appropriate privileges to use the \fBsocket()\fR -function or to create some sockets. -.SH PARAMETERS -.sp -.LP -The function takes the following arguments: -.sp -.ne 2 -.na -\fB\fIdomain\fR\fR -.ad -.RS 12n -Specifies the communications domain in which a socket is to be created. -.RE - -.sp -.ne 2 -.na -\fB\fItype\fR\fR -.ad -.RS 12n -Specifies the type of socket to be created. -.RE - -.sp -.ne 2 -.na -\fB\fIprotocol\fR\fR -.ad -.RS 12n -Specifies a particular protocol to be used with the socket. Specifying a -\fIprotocol\fR of 0 causes \fBsocket()\fR to use an unspecified default -protocol appropriate for the requested socket type. -.RE - -.sp -.LP -The \fIdomain\fR argument specifies the address family used in the -communications domain. The address families supported by the system are -implementation-dependent. -.SH USAGE -.sp -.LP -The documentation for specific address families specify which protocols each -address family supports. The documentation for specific protocols specify -which socket types each protocol supports. -.sp -.LP -The application can determine if an address family is supported by trying to -create a socket with \fIdomain\fR set to the protocol in question. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, \fBsocket()\fR returns a nonnegative integer, the -socket file descriptor. Otherwise a value of \fB-1\fR is returned and -\fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBsocket()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 19n -The implementation does not support the specified address family. -.RE - -.sp -.ne 2 -.na -\fB\fBEMFILE\fR\fR -.ad -.RS 19n -No more file descriptors are available for this process. -.RE - -.sp -.ne 2 -.na -\fB\fBENFILE\fR\fR -.ad -.RS 19n -No more file descriptors are available for the system. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTONOSUPPORT\fR\fR -.ad -.RS 19n -The protocol is not supported by the address family, or the protocol is not -supported by the implementation. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTOTYPE\fR\fR -.ad -.RS 19n -The socket type is not supported by the protocol. -.RE - -.sp -.LP -The \fBsocket()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 11n -The process does not have appropriate privileges. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 11n -Insufficient memory was available to fulfill the request. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBaccept\fR(3XNET), \fBbind\fR(3XNET), \fBconnect\fR(3XNET), -\fBgetsockname\fR(3XNET), \fBgetsockopt\fR(3XNET), \fBlisten\fR(3XNET), -\fBrecv\fR(3XNET), \fBrecvfrom\fR(3XNET), \fBrecvmsg\fR(3XNET), -\fBsend\fR(3XNET), \fBsendmsg\fR(3XNET), \fBsetsockopt\fR(3XNET), -\fBshutdown\fR(3XNET), \fBsocketpair\fR(3XNET), \fBattributes\fR(5), -\fBstandards\fR(5) diff --git a/usr/src/man/man3xnet/socketpair.3xnet b/usr/src/man/man3xnet/socketpair.3xnet deleted file mode 100644 index 682ba59d3c..0000000000 --- a/usr/src/man/man3xnet/socketpair.3xnet +++ /dev/null @@ -1,252 +0,0 @@ -'\" te -.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at -.\" http://www.opengroup.org/bookstore/. -.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. -.\" This notice shall appear on any product containing this material. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SOCKETPAIR 3XNET "Jun 10, 2002" -.SH NAME -socketpair \- create a pair of connected sockets -.SH SYNOPSIS -.LP -.nf -\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... [ \fIlibrary\fR ... ] -#include - -\fBint\fR \fBsocketpair\fR(\fBint\fR \fIdomain\fR, \fBint\fR \fItype\fR, \fBint\fR \fIprotocol\fR, \fBint\fR \fIsocket_vector\fR\fB[2]\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBsocketpair()\fR function creates an unbound pair of connected sockets in -a specified \fIdomain\fR, of a specified \fBtype\fR, under the protocol -optionally specified by the \fIprotocol\fR argument. The two sockets are -identical. The file descriptors used in referencing the created sockets are -returned in \fIsocket_vector\fR\fB0\fR and \fIsocket_vector\fR\fB1\fR. -.sp -.LP -The \fItype\fR argument specifies the socket type, which determines the -semantics of communications over the socket. The socket types supported by the -system are implementation-dependent. Possible socket types include: -.sp -.ne 2 -.na -\fB\fBSOCK_STREAM\fR\fR -.ad -.RS 18n -Provides sequenced, reliable, bidirectional, connection-mode byte streams, and -may provide a transmission mechanism for out-of-band data. -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_DGRAM\fR\fR -.ad -.RS 18n -Provides datagrams, which are connectionless-mode, unreliable messages of fixed -maximum length. -.RE - -.sp -.ne 2 -.na -\fB\fBSOCK_SEQPACKET\fR\fR -.ad -.RS 18n -Provides sequenced, reliable, bidirectional, connection-mode transmission path -for records. A record can be sent using one or more output operations and -received using one or more input operations, but a single operation never -transfers part of more than one record. Record boundaries are visible to the -receiver via the MSG_EOR flag. -.RE - -.sp -.LP -If the \fIprotocol\fR argument is non-zero, it must specify a protocol that is -supported by the address family. The protocols supported by the system are -implementation-dependent. -.sp -.LP -The process may need to have appropriate privileges to use the -\fBsocketpair()\fR function or to create some sockets. -.SH PARAMETERS -.sp -.ne 2 -.na -\fB\fIdomain\fR\fR -.ad -.RS 17n -Specifies the communications domain in which the sockets are to be created. -.RE - -.sp -.ne 2 -.na -\fB\fItype\fR\fR -.ad -.RS 17n -Specifies the type of sockets to be created. -.RE - -.sp -.ne 2 -.na -\fB\fIprotocol\fR\fR -.ad -.RS 17n -Specifies a particular protocol to be used with the sockets. Specifying a -\fIprotocol\fR of 0 causes \fBsocketpair()\fR to use an unspecified default -protocol appropriate for the requested socket type. -.RE - -.sp -.ne 2 -.na -\fB\fIsocket_vector\fR\fR -.ad -.RS 17n -Specifies a 2-integer array to hold the file descriptors of the created socket -pair. -.RE - -.SH USAGE -.sp -.LP -The documentation for specific address families specifies which protocols each -address family supports. The documentation for specific protocols specifies -which socket types each protocol supports. -.sp -.LP -The \fBsocketpair()\fR function is used primarily with UNIX domain sockets and -need not be supported for other domains. -.SH RETURN VALUES -.sp -.LP -Upon successful completion, this function returns 0. Otherwise, \(mi1 is -returned and \fBerrno\fR is set to indicate the error. -.SH ERRORS -.sp -.LP -The \fBsocketpair()\fR function will fail if: -.sp -.ne 2 -.na -\fB\fBEAFNOSUPPORT\fR\fR -.ad -.RS 19n -The implementation does not support the specified address family. -.RE - -.sp -.ne 2 -.na -\fB\fBEMFILE\fR\fR -.ad -.RS 19n -No more file descriptors are available for this process. -.RE - -.sp -.ne 2 -.na -\fB\fBENFILE\fR\fR -.ad -.RS 19n -No more file descriptors are available for the system. -.RE - -.sp -.ne 2 -.na -\fB\fBEOPNOTSUPP\fR\fR -.ad -.RS 19n -The specified protocol does not permit creation of socket pairs. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTONOSUPPORT\fR\fR -.ad -.RS 19n -The protocol is not supported by the address family, or the protocol is not -supported by the implementation. -.RE - -.sp -.ne 2 -.na -\fB\fBEPROTOTYPE\fR\fR -.ad -.RS 19n -The socket type is not supported by the protocol. -.RE - -.sp -.LP -The \fBsocketpair()\fR function may fail if: -.sp -.ne 2 -.na -\fB\fBEACCES\fR\fR -.ad -.RS 11n -The process does not have appropriate privileges. -.RE - -.sp -.ne 2 -.na -\fB\fBENOBUFS\fR\fR -.ad -.RS 11n -Insufficient resources were available in the system to perform the operation. -.RE - -.sp -.ne 2 -.na -\fB\fBENOMEM\fR\fR -.ad -.RS 11n -Insufficient memory was available to fulfill the request. -.RE - -.sp -.ne 2 -.na -\fB\fBENOSR\fR\fR -.ad -.RS 11n -There were insufficient STREAMS resources available for the operation to -complete. -.RE - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Standard -_ -MT-Level MT-Safe -.TE - -.SH SEE ALSO -.sp -.LP -\fBsocket\fR(3XNET), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/pkg/manifests/system-kernel.man2.inc b/usr/src/pkg/manifests/system-kernel.man2.inc index 3f85767644..77cf0e2ae6 100644 --- a/usr/src/pkg/manifests/system-kernel.man2.inc +++ b/usr/src/pkg/manifests/system-kernel.man2.inc @@ -25,6 +25,7 @@ file path=usr/share/man/man2/_lwp_mutex_lock.2 file path=usr/share/man/man2/_lwp_self.2 file path=usr/share/man/man2/_lwp_sema_wait.2 file path=usr/share/man/man2/_lwp_suspend.2 +file path=usr/share/man/man2/accept.2 file path=usr/share/man/man2/access.2 file path=usr/share/man/man2/acct.2 file path=usr/share/man/man2/acl.2 @@ -32,12 +33,14 @@ file path=usr/share/man/man2/adjtime.2 file path=usr/share/man/man2/alarm.2 file path=usr/share/man/man2/audit.2 file path=usr/share/man/man2/auditon.2 +file path=usr/share/man/man2/bind.2 file path=usr/share/man/man2/brk.2 file path=usr/share/man/man2/chdir.2 file path=usr/share/man/man2/chmod.2 file path=usr/share/man/man2/chown.2 file path=usr/share/man/man2/chroot.2 file path=usr/share/man/man2/close.2 +file path=usr/share/man/man2/connect.2 file path=usr/share/man/man2/creat.2 file path=usr/share/man/man2/dup.2 file path=usr/share/man/man2/exec.2 @@ -55,17 +58,21 @@ file path=usr/share/man/man2/getisax.2 file path=usr/share/man/man2/getitimer.2 file path=usr/share/man/man2/getlabel.2 file path=usr/share/man/man2/getmsg.2 +file path=usr/share/man/man2/getpeername.2 file path=usr/share/man/man2/getpflags.2 file path=usr/share/man/man2/getpid.2 file path=usr/share/man/man2/getppriv.2 file path=usr/share/man/man2/getrlimit.2 file path=usr/share/man/man2/getsid.2 +file path=usr/share/man/man2/getsockname.2 +file path=usr/share/man/man2/getsockopt.2 file path=usr/share/man/man2/getuid.2 file path=usr/share/man/man2/getustack.2 file path=usr/share/man/man2/ioctl.2 file path=usr/share/man/man2/issetugid.2 file path=usr/share/man/man2/kill.2 file path=usr/share/man/man2/link.2 +file path=usr/share/man/man2/listen.2 file path=usr/share/man/man2/llseek.2 file path=usr/share/man/man2/lseek.2 file path=usr/share/man/man2/memcntl.2 @@ -106,6 +113,7 @@ file path=usr/share/man/man2/pset_setattr.2 file path=usr/share/man/man2/putmsg.2 file path=usr/share/man/man2/read.2 file path=usr/share/man/man2/readlink.2 +file path=usr/share/man/man2/recv.2 file path=usr/share/man/man2/rename.2 file path=usr/share/man/man2/resolvepath.2 file path=usr/share/man/man2/rmdir.2 @@ -113,6 +121,7 @@ file path=usr/share/man/man2/semctl.2 file path=usr/share/man/man2/semget.2 file path=usr/share/man/man2/semids.2 file path=usr/share/man/man2/semop.2 +file path=usr/share/man/man2/send.2 file path=usr/share/man/man2/setpgid.2 file path=usr/share/man/man2/setpgrp.2 file path=usr/share/man/man2/setrctl.2 @@ -125,6 +134,7 @@ file path=usr/share/man/man2/shmctl.2 file path=usr/share/man/man2/shmget.2 file path=usr/share/man/man2/shmids.2 file path=usr/share/man/man2/shmop.2 +file path=usr/share/man/man2/shutdown.2 file path=usr/share/man/man2/sigaction.2 file path=usr/share/man/man2/sigaltstack.2 file path=usr/share/man/man2/sigpending.2 @@ -132,6 +142,8 @@ file path=usr/share/man/man2/sigprocmask.2 file path=usr/share/man/man2/sigsend.2 file path=usr/share/man/man2/sigsuspend.2 file path=usr/share/man/man2/sigwait.2 +file path=usr/share/man/man2/socket.2 +file path=usr/share/man/man2/socketpair.2 file path=usr/share/man/man2/stat.2 file path=usr/share/man/man2/statvfs.2 file path=usr/share/man/man2/stime.2 @@ -168,6 +180,7 @@ link path=usr/share/man/man2/_lwp_mutex_unlock.2 target=_lwp_mutex_lock.2 link path=usr/share/man/man2/_lwp_sema_init.2 target=_lwp_sema_wait.2 link path=usr/share/man/man2/_lwp_sema_post.2 target=_lwp_sema_wait.2 link path=usr/share/man/man2/_lwp_sema_trywait.2 target=_lwp_sema_wait.2 +link path=usr/share/man/man2/accept4.2 target=accept.2 link path=usr/share/man/man2/execl.2 target=exec.2 link path=usr/share/man/man2/execle.2 target=exec.2 link path=usr/share/man/man2/execlp.2 target=exec.2 @@ -224,9 +237,13 @@ link path=usr/share/man/man2/pwrite.2 target=write.2 link path=usr/share/man/man2/pwritev.2 target=write.2 link path=usr/share/man/man2/readlinkat.2 target=readlink.2 link path=usr/share/man/man2/readv.2 target=read.2 +link path=usr/share/man/man2/recvfrom.2 target=recv.2 +link path=usr/share/man/man2/recvmsg.2 target=recv.2 link path=usr/share/man/man2/renameat.2 target=rename.2 link path=usr/share/man/man2/sbrk.2 target=brk.2 link path=usr/share/man/man2/semtimedop.2 target=semop.2 +link path=usr/share/man/man2/sendto.2 target=send.2 +link path=usr/share/man/man2/sendmsg.2 target=send.2 link path=usr/share/man/man2/setaudit.2 target=getaudit.2 link path=usr/share/man/man2/setaudit_addr.2 target=getaudit.2 link path=usr/share/man/man2/setauid.2 target=getauid.2 @@ -239,6 +256,7 @@ link path=usr/share/man/man2/setitimer.2 target=getitimer.2 link path=usr/share/man/man2/setpflags.2 target=getpflags.2 link path=usr/share/man/man2/setppriv.2 target=getppriv.2 link path=usr/share/man/man2/setrlimit.2 target=getrlimit.2 +link path=usr/share/man/man2/setsockopt.2 target=getsockopt.2 link path=usr/share/man/man2/setustack.2 target=getustack.2 link path=usr/share/man/man2/shmat.2 target=shmop.2 link path=usr/share/man/man2/shmdt.2 target=shmop.2 diff --git a/usr/src/pkg/manifests/system-library.man3.inc b/usr/src/pkg/manifests/system-library.man3.inc index 6e49344f4f..f3ed50a133 100644 --- a/usr/src/pkg/manifests/system-library.man3.inc +++ b/usr/src/pkg/manifests/system-library.man3.inc @@ -15,4 +15,10 @@ # file path=usr/share/man/man3/Intro.3 +file path=usr/share/man/man3/sockatmark.3 +file path=usr/share/man/man3/CMSG_DATA.3 link path=usr/share/man/man3/intro.3 target=Intro.3 +link path=usr/share/man/man3/CMSG_FIRSTHDR.3 target=CMSG_DATA.3 +link path=usr/share/man/man3/CMSG_LEN.3 target=CMSG_DATA.3 +link path=usr/share/man/man3/CMSG_NEXTHDR.3 target=CMSG_DATA.3 +link path=usr/share/man/man3/CMSG_SPACE.3 target=CMSG_DATA.3 diff --git a/usr/src/pkg/manifests/system-library.man3socket.inc b/usr/src/pkg/manifests/system-library.man3socket.inc index 6b1ea6641b..e569b0d27a 100644 --- a/usr/src/pkg/manifests/system-library.man3socket.inc +++ b/usr/src/pkg/manifests/system-library.man3socket.inc @@ -15,29 +15,21 @@ # Copyright 2013, OmniTI Computer Consulting, Inc. # -file path=usr/share/man/man3socket/accept.3socket -file path=usr/share/man/man3socket/bind.3socket file path=usr/share/man/man3socket/byteorder.3socket -file path=usr/share/man/man3socket/connect.3socket file path=usr/share/man/man3socket/ethers.3socket file path=usr/share/man/man3socket/getaddrinfo.3socket file path=usr/share/man/man3socket/getifaddrs.3socket file path=usr/share/man/man3socket/getipnodebyname.3socket file path=usr/share/man/man3socket/getnetbyname.3socket -file path=usr/share/man/man3socket/getpeername.3socket file path=usr/share/man/man3socket/getprotobyname.3socket file path=usr/share/man/man3socket/getservbyname.3socket -file path=usr/share/man/man3socket/getsockname.3socket -file path=usr/share/man/man3socket/getsockopt.3socket file path=usr/share/man/man3socket/getsourcefilter.3socket file path=usr/share/man/man3socket/icmp6_filter.3socket file path=usr/share/man/man3socket/if_nametoindex.3socket file path=usr/share/man/man3socket/inet.3socket file path=usr/share/man/man3socket/inet6_opt.3socket file path=usr/share/man/man3socket/inet6_rth.3socket -file path=usr/share/man/man3socket/listen.3socket file path=usr/share/man/man3socket/rcmd.3socket -file path=usr/share/man/man3socket/recv.3socket file path=usr/share/man/man3socket/rexec.3socket file path=usr/share/man/man3socket/sctp_bindx.3socket file path=usr/share/man/man3socket/sctp_getladdrs.3socket @@ -47,13 +39,8 @@ file path=usr/share/man/man3socket/sctp_peeloff.3socket file path=usr/share/man/man3socket/sctp_recvmsg.3socket file path=usr/share/man/man3socket/sctp_send.3socket file path=usr/share/man/man3socket/sctp_sendmsg.3socket -file path=usr/share/man/man3socket/send.3socket -file path=usr/share/man/man3socket/shutdown.3socket file path=usr/share/man/man3socket/sockaddr.3socket -file path=usr/share/man/man3socket/socket.3socket -file path=usr/share/man/man3socket/socketpair.3socket file path=usr/share/man/man3socket/spray.3socket -link path=usr/share/man/man3socket/accept4.3socket target=accept.3socket link path=usr/share/man/man3socket/endnetent.3socket \ target=getnetbyname.3socket link path=usr/share/man/man3socket/endprotoent.3socket \ @@ -160,8 +147,6 @@ link path=usr/share/man/man3socket/ntohl.3socket target=byteorder.3socket link path=usr/share/man/man3socket/ntohll.3socket target=byteorder.3socket link path=usr/share/man/man3socket/ntohs.3socket target=byteorder.3socket link path=usr/share/man/man3socket/rcmd_af.3socket target=rcmd.3socket -link path=usr/share/man/man3socket/recvfrom.3socket target=recv.3socket -link path=usr/share/man/man3socket/recvmsg.3socket target=recv.3socket link path=usr/share/man/man3socket/rexec_af.3socket target=rexec.3socket link path=usr/share/man/man3socket/rresvport.3socket target=rcmd.3socket link path=usr/share/man/man3socket/rresvport_af.3socket target=rcmd.3socket @@ -170,8 +155,6 @@ link path=usr/share/man/man3socket/sctp_freeladdrs.3socket \ target=sctp_getladdrs.3socket link path=usr/share/man/man3socket/sctp_freepaddrs.3socket \ target=sctp_getpaddrs.3socket -link path=usr/share/man/man3socket/sendmsg.3socket target=send.3socket -link path=usr/share/man/man3socket/sendto.3socket target=send.3socket link path=usr/share/man/man3socket/setipv4sourcefilter.3socket \ target=getsourcefilter.3socket link path=usr/share/man/man3socket/setnetent.3socket \ @@ -180,8 +163,6 @@ link path=usr/share/man/man3socket/setprotoent.3socket \ target=getprotobyname.3socket link path=usr/share/man/man3socket/setservent.3socket \ target=getservbyname.3socket -link path=usr/share/man/man3socket/setsockopt.3socket \ - target=getsockopt.3socket link path=usr/share/man/man3socket/setsourcefilter.3socket \ target=getsourcefilter.3socket link path=usr/share/man/man3socket/sockaddr_dl.3socket target=sockaddr.3socket diff --git a/usr/src/pkg/manifests/system-library.man3xnet.inc b/usr/src/pkg/manifests/system-library.man3xnet.inc index 67726dce57..6e578c380f 100644 --- a/usr/src/pkg/manifests/system-library.man3xnet.inc +++ b/usr/src/pkg/manifests/system-library.man3xnet.inc @@ -14,9 +14,6 @@ # Copyright 2012 Nexenta Systems, Inc. All rights reserved. # -file path=usr/share/man/man3xnet/accept.3xnet -file path=usr/share/man/man3xnet/bind.3xnet -file path=usr/share/man/man3xnet/connect.3xnet file path=usr/share/man/man3xnet/endhostent.3xnet file path=usr/share/man/man3xnet/endnetent.3xnet file path=usr/share/man/man3xnet/endprotoent.3xnet @@ -25,25 +22,10 @@ file path=usr/share/man/man3xnet/freeaddrinfo.3xnet file path=usr/share/man/man3xnet/gai_strerror.3xnet file path=usr/share/man/man3xnet/gethostname.3xnet file path=usr/share/man/man3xnet/getnameinfo.3xnet -file path=usr/share/man/man3xnet/getpeername.3xnet -file path=usr/share/man/man3xnet/getsockname.3xnet -file path=usr/share/man/man3xnet/getsockopt.3xnet file path=usr/share/man/man3xnet/htonl.3xnet file path=usr/share/man/man3xnet/if_nametoindex.3xnet file path=usr/share/man/man3xnet/inet_addr.3xnet file path=usr/share/man/man3xnet/inet_ntop.3xnet -file path=usr/share/man/man3xnet/listen.3xnet -file path=usr/share/man/man3xnet/recv.3xnet -file path=usr/share/man/man3xnet/recvfrom.3xnet -file path=usr/share/man/man3xnet/recvmsg.3xnet -file path=usr/share/man/man3xnet/send.3xnet -file path=usr/share/man/man3xnet/sendmsg.3xnet -file path=usr/share/man/man3xnet/sendto.3xnet -file path=usr/share/man/man3xnet/setsockopt.3xnet -file path=usr/share/man/man3xnet/shutdown.3xnet -file path=usr/share/man/man3xnet/sockatmark.3xnet -file path=usr/share/man/man3xnet/socket.3xnet -file path=usr/share/man/man3xnet/socketpair.3xnet link path=usr/share/man/man3xnet/getaddrinfo.3xnet target=freeaddrinfo.3xnet link path=usr/share/man/man3xnet/gethostbyaddr.3xnet target=endhostent.3xnet link path=usr/share/man/man3xnet/gethostbyname.3xnet target=endhostent.3xnet -- 2.11.4.GIT