From 177d5b5f8c0e969013441207a0a705ae66b08cf7 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Sun, 16 Nov 2014 13:51:26 -0800 Subject: [PATCH] 5331 want sockaddr(3SOCKET) Reviewed by: Joshua M. Clulow Reviewed by: Dan McDonald Approved by: Richard Lowe --- usr/src/man/man3head/in.h.3head | 9 +- usr/src/man/man3head/socket.h.3head | 6 +- usr/src/man/man3head/un.h.3head | 6 +- usr/src/man/man3sip/sip_stack_init.3sip | 10 +- usr/src/man/man3socket/Makefile | 16 +- usr/src/man/man3socket/accept.3socket | 11 +- usr/src/man/man3socket/bind.3socket | 10 +- usr/src/man/man3socket/connect.3socket | 9 +- usr/src/man/man3socket/getaddrinfo.3socket | 14 +- usr/src/man/man3socket/getifaddrs.3socket | 11 +- usr/src/man/man3socket/getpeername.3socket | 6 +- usr/src/man/man3socket/getsockname.3socket | 9 +- usr/src/man/man3socket/getsourcefilter.3socket | 8 +- usr/src/man/man3socket/recv.3socket | 9 +- usr/src/man/man3socket/sctp_bindx.3socket | 11 +- usr/src/man/man3socket/sctp_getladdrs.3socket | 6 +- usr/src/man/man3socket/sctp_getpaddrs.3socket | 6 +- usr/src/man/man3socket/sctp_opt_info.3socket | 9 +- usr/src/man/man3socket/sctp_peeloff.3socket | 5 - usr/src/man/man3socket/sctp_recvmsg.3socket | 9 +- usr/src/man/man3socket/sctp_send.3socket | 5 - usr/src/man/man3socket/sctp_sendmsg.3socket | 9 +- usr/src/man/man3socket/send.3socket | 8 +- usr/src/man/man3socket/sockaddr.3socket | 562 +++++++++++++++++++++ usr/src/man/man3xnet/accept.3xnet | 7 +- usr/src/man/man3xnet/bind.3xnet | 7 +- usr/src/man/man3xnet/connect.3xnet | 7 +- usr/src/man/man3xnet/getnameinfo.3xnet | 8 +- usr/src/man/man3xnet/getpeername.3xnet | 6 +- usr/src/man/man3xnet/getsockname.3xnet | 6 +- usr/src/man/man3xnet/recvfrom.3xnet | 9 +- usr/src/man/man3xnet/sendto.3xnet | 10 +- usr/src/man/man7p/arp.7p | 10 +- usr/src/man/man7p/if_tcp.7p | 11 +- usr/src/man/man7p/inet.7p | 10 +- usr/src/man/man7p/inet6.7p | 10 +- usr/src/man/man7p/pf_key.7p | 40 +- usr/src/man/man7p/route.7p | 6 +- .../pkg/manifests/system-library.man3socket.inc | 9 + 39 files changed, 647 insertions(+), 273 deletions(-) create mode 100644 usr/src/man/man3socket/sockaddr.3socket diff --git a/usr/src/man/man3head/in.h.3head b/usr/src/man/man3head/in.h.3head index 0e1a80010e..add74591c5 100644 --- a/usr/src/man/man3head/in.h.3head +++ b/usr/src/man/man3head/in.h.3head @@ -17,7 +17,6 @@ in.h, in \- Internet Protocol family .fi .SH DESCRIPTION -.sp .LP The <\fBnetinet/in.h\fR> header defines the following types through \fBtypedef\fR: @@ -121,7 +120,6 @@ The <\fBnetinet/in.h\fR> header defines the \fBsockaddr_in\fR structure that is used to store addresses for the Internet protocol family. Values of this type must be cast to \fBstruct sockaddr\fR for use with the socket interfaces. .SS "Default" -.sp .LP For applications that do not require standard-conforming behavior (those that use the socket interfaces described in section (3SOCKET) of the reference @@ -139,7 +137,6 @@ char sin_zero[8] .in -2 .SS "Standard conforming" -.sp .LP For applications that require standard-conforming behavior (those that use the socket interfaces described in section (3XNET) of the reference manual; see @@ -156,7 +153,6 @@ unsigned char sin_zero[8] .in -2 .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -172,10 +168,9 @@ Interface Stability Standard .TE .SH SEE ALSO -.sp .LP \fBIntro\fR(3), \fBconnect\fR(3SOCKET), \fBconnect\fR(3XNET), \fBgetsockopt\fR(3SOCKET), \fBgetsockopt\fR(3XNET), \fBsendmsg\fR(3SOCKET), \fBsendmsg\fR(3XNET), \fBsendto\fR(3SOCKET), \fBsendto\fR(3XNET), -\fBsetsockopt\fR(3SOCKET), \fBsetsockopt\fR(3XNET), \fBsocket.h\fR(3HEAD), -\fBattributes\fR(5), \fBstandards\fR(5) +\fBsetsockopt\fR(3SOCKET), \fBsetsockopt\fR(3XNET), \fBsockaddr\fR(3SOCKET), +\fBsocket.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3head/socket.h.3head b/usr/src/man/man3head/socket.h.3head index ecd516e1b2..781dcf14f1 100644 --- a/usr/src/man/man3head/socket.h.3head +++ b/usr/src/man/man3head/socket.h.3head @@ -19,7 +19,6 @@ socket.h, socket \- Internet Protocol family .fi .SH DESCRIPTION -.sp .LP The \fB\fR header defines the unsigned integral type \fBsa_family_t\fR through \fBtypedef\fR. @@ -37,7 +36,6 @@ char sa_data[] /* socket address (variable-length .in -2 .SS "\fBlibxnet\fR Interfaces" -.sp .LP The \fB\fR header defines the \fBmsghdr\fR structure for \fBlibxnet\fR interfaces that includes the following members: @@ -689,7 +687,6 @@ Disables further send and receive operations. .RE .SS "\fBlibsocket\fR Interfaces" -.sp .LP The \fB\fR header defines the \fBmsghdr\fR structure for \fBlibsocket\fR interfaces that includes the following members: @@ -714,7 +711,6 @@ in \fBread\fR(2). The \fImsg_accrights\fR parameter specifies the buffer in which access rights sent along with the message are received. The \fImsg_accrightslen\fR specifies the length of the buffer. .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -730,7 +726,6 @@ Interface Stability Standard .TE .SH SEE ALSO -.sp .LP \fBaccept\fR(3SOCKET), \fBaccept\fR(3XNET), \fBbind\fR(3SOCKET), \fBbind\fR(3XNET), \fBconnect\fR(3SOCKET), \fBconnect\fR(3XNET), @@ -743,6 +738,7 @@ Interface Stability Standard \fBsend\fR(3XNET), \fBsendmsg\fR(3SOCKET), \fBsendmsg\fR(3XNET), \fBsendto\fR(3SOCKET), \fBsendto\fR(3XNET), \fBsetsockopt\fR(3SOCKET), \fBsetsockopt\fR(3XNET), \fBshutdown\fR(3SOCKET), \fBshutdown\fR(3XNET), +\fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsocket\fR(3XNET), \fBsocketpair\fR(3SOCKET), \fBsocketpair\fR(3XNET), \fBucred_get\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3head/un.h.3head b/usr/src/man/man3head/un.h.3head index 155a845b6a..6af9dd8dda 100644 --- a/usr/src/man/man3head/un.h.3head +++ b/usr/src/man/man3head/un.h.3head @@ -17,7 +17,6 @@ un.h, un \- definitions for UNIX-domain sockets .fi .SH DESCRIPTION -.sp .LP The <\fBsys/un.h\fR> header defines the \fBsockaddr_un\fR structure that includes the following members: @@ -39,7 +38,6 @@ the socket interfaces. The <\fBsys/un.h\fR> header defines the type \fBsa_family_t\fR as described in \fBsocket.h\fR(3HEAD). .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -55,8 +53,8 @@ Interface Stability Standard .TE .SH SEE ALSO -.sp .LP \fBbind\fR(3SOCKET), \fBbind\fR(3XNET), \fBsocket.h\fR(3HEAD), \fBsocket\fR(3SOCKET), \fBsocket\fR(3XNET), \fBsocketpair\fR(3SOCKET), -\fBsocketpair\fR(3XNET), \fBattributes\fR(5), \fBstandards\fR(5) +\fBsocketpair\fR(3XNET), \fBsockaddr\fR(3SOCKET), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3sip/sip_stack_init.3sip b/usr/src/man/man3sip/sip_stack_init.3sip index 36e673fa7b..b2daf54386 100644 --- a/usr/src/man/man3sip/sip_stack_init.3sip +++ b/usr/src/man/man3sip/sip_stack_init.3sip @@ -16,7 +16,6 @@ sip_stack_init \- initializes SIP stack .fi .SH DESCRIPTION -.sp .LP The \fBsip_stack_init()\fR function is used to initialize the \fBSIP\fR stack. The stack can be initialized by a process only once. Any shared library that is @@ -60,7 +59,6 @@ all. .RE .SS "Upper Layer Registrations" -.sp .LP These include callbacks that are invoked to deliver incoming messages or error notification. @@ -177,7 +175,6 @@ If these callback routines are registered, the stack invokes .RE .SS "Connection Manager Interface" -.sp .LP The connection manager interfaces must be registered by the application to provide I/O related functionality to the stack. These interfaces act on a @@ -324,7 +321,6 @@ retransmit interval - default \fB32\fR \fBsecs\fR). .RE .SS "Custom \fBSIP\fR headers" -.sp .LP In addition to the \fBSIP\fR headers supported by the stack, an application can optionally provide a table of custom headers and associated parsing functions. @@ -414,7 +410,6 @@ application. .RE .SH RETURN VALUES -.sp .LP On success \fBsip_stack_init()\fR returns \fB0\fR. Otherwise, the function returns the error value. @@ -423,7 +418,6 @@ returns the error value. The value of \fBerrno\fR is not changed by these calls in the event of an error. .SH ERRORS -.sp .LP On failure, the \fBsip_stack_init()\fR function returns the following error value: @@ -438,7 +432,6 @@ missing. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -456,6 +449,5 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP -\fBlibsip\fR(3LIB) +\fBlibsip\fR(3LIB), \fBsockaddr\fR(3SOCKET) diff --git a/usr/src/man/man3socket/Makefile b/usr/src/man/man3socket/Makefile index a119ee08dc..c4bbd116c7 100644 --- a/usr/src/man/man3socket/Makefile +++ b/usr/src/man/man3socket/Makefile @@ -52,6 +52,7 @@ MANFILES= accept.3socket \ sctp_send.3socket \ sctp_sendmsg.3socket \ send.3socket \ + sockaddr.3socket \ shutdown.3socket \ socket.3socket \ socketpair.3socket \ @@ -136,7 +137,13 @@ MANLINKS= accept4.3socket \ setprotoent.3socket \ setservent.3socket \ setsockopt.3socket \ - setsourcefilter.3socket + setsourcefilter.3socket \ + sockaddr_dl.3socket \ + sockaddr_in.3socket \ + sockaddr_in6.3socket \ + sockaddr_ll.3socket \ + sockaddr_storage.3socket \ + sockaddr_un.3socket accept4.3socket := LINKSRC = accept.3socket @@ -239,6 +246,13 @@ 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 +sockaddr_ll.3socket := LINKSRC = sockaddr.3socket +sockaddr_storage.3socket := LINKSRC = sockaddr.3socket +sockaddr_un.3socket := LINKSRC = sockaddr.3socket + .KEEP_STATE: include $(SRC)/man/Makefile.man diff --git a/usr/src/man/man3socket/accept.3socket b/usr/src/man/man3socket/accept.3socket index c6afea7625..c253ba3aea 100644 --- a/usr/src/man/man3socket/accept.3socket +++ b/usr/src/man/man3socket/accept.3socket @@ -22,7 +22,6 @@ accept \- accept a connection on a socket .fi .SH DESCRIPTION -.sp .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 @@ -103,12 +102,10 @@ 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 -.sp .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 -.sp .LP \fBaccept()\fR and \fBaccept4()\fR will fail if: .sp @@ -239,7 +236,6 @@ bitwise inclusive-OR of \fBSOCK_CLOEXEC\fR, \fBSOCK_NONBLOCK\fR, and .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -255,9 +251,8 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBpoll\fR(2), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET), -\fBlisten\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 +\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 index 723926dec4..8c0f1cdfd7 100644 --- a/usr/src/man/man3socket/bind.3socket +++ b/usr/src/man/man3socket/bind.3socket @@ -20,19 +20,16 @@ bind \- bind a name to a socket .fi .SH DESCRIPTION -.sp .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 -.sp .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 -.sp .LP The \fBbind()\fR function will fail if: .sp @@ -174,7 +171,6 @@ The inode would reside on a read-only file system. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -190,12 +186,10 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP -\fBunlink\fR(2), \fBsocket\fR(3SOCKET), \fBattributes\fR(5), -\fBprivileges\fR(5), \fBsocket.h\fR(3HEAD) +\fBunlink\fR(2), \fBsocket\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), +\fBattributes\fR(5), \fBprivileges\fR(5), \fBsocket.h\fR(3HEAD) .SH NOTES -.sp .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). diff --git a/usr/src/man/man3socket/connect.3socket b/usr/src/man/man3socket/connect.3socket index d724a0d990..767eb2c79e 100644 --- a/usr/src/man/man3socket/connect.3socket +++ b/usr/src/man/man3socket/connect.3socket @@ -21,7 +21,6 @@ connect \- initiate a connection on a socket .fi .SH DESCRIPTION -.sp .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. @@ -37,12 +36,10 @@ 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. .SH RETURN VALUES -.sp .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 -.sp .LP The call fails if: .sp @@ -288,7 +285,6 @@ type \fIs\fR. For example, \fIs\fR is a \fBSOCK_DGRAM\fR socket, while .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -304,8 +300,7 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBclose\fR(2), \fBaccept\fR(3SOCKET), \fBgetsockname\fR(3SOCKET), -\fBselect\fR(3C), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), -\fBattributes\fR(5) +\fBselect\fR(3C), \fBsocket\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), +\fBsocket.h\fR(3HEAD), \fBattributes\fR(5) diff --git a/usr/src/man/man3socket/getaddrinfo.3socket b/usr/src/man/man3socket/getaddrinfo.3socket index 135c8b5f80..1ab1f78d61 100644 --- a/usr/src/man/man3socket/getaddrinfo.3socket +++ b/usr/src/man/man3socket/getaddrinfo.3socket @@ -36,7 +36,6 @@ name and address .fi .SH DESCRIPTION -.sp .LP These functions perform translations from node name to address and from address to node name in a protocol-independent manner. @@ -295,7 +294,6 @@ TCP. These \fBNI_\fR* flags are defined in <\fBnetdb.h\fR> along with the \fBAI_\fR* flags already defined for \fBgetaddrinfo()\fR. .SH RETURN VALUES -.sp .LP For \fBgetaddrinfo()\fR, if the query is successful, a pointer to a linked list of one or more \fBaddrinfo\fR structures is returned by the fourth argument and @@ -310,7 +308,6 @@ pointer to a string containing an error message appropriate for the \fBEAI_\fR* errors is returned. If \fIerrcode\fR is not one of the \fBEAI_\fR* values, a pointer to a string indicating an unknown error is returned. .SS "Address Ordering" -.sp .LP AF_INET6 addresses returned by the fourth argument of \fBgetaddrinfo()\fR are ordered according to the algorithm described in \fIRFC 3484, Default Address @@ -371,7 +368,6 @@ T} .TE .SH ERRORS -.sp .LP The following names are the error values returned by \fBgetaddrinfo()\fR and are defined in <\fBnetdb.h\fR>: @@ -484,7 +480,6 @@ System error was returned in \fIerrno\fR. .RE .SH FILES -.sp .ne 2 .na \fB\fB/etc/inet/hosts\fR\fR @@ -512,7 +507,6 @@ configuration file for the name service switch .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for description of the following attributes: .sp @@ -532,17 +526,15 @@ Standard See \fBstandards\fR(5). .TE .SH SEE ALSO -.sp .LP \fBipaddrsel\fR(1M), \fBgethostbyname\fR(3NSL), \fBgetipnodebyname\fR(3SOCKET), -\fBhtonl\fR(3SOCKET), \fBinet\fR(3SOCKET), \fBnetdb.h\fR(3HEAD), -\fBsocket\fR(3SOCKET), \fBhosts\fR(4), \fBnsswitch.conf\fR(4), -\fBattributes\fR(5), \fBstandards\fR(5), \fBinet6\fR(7P) +\fBhtonl\fR(3SOCKET), \fBinet\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), +\fBnetdb.h\fR(3HEAD), \fBsocket\fR(3SOCKET), \fBhosts\fR(4), +\fBnsswitch.conf\fR(4), \fBattributes\fR(5), \fBstandards\fR(5), \fBinet6\fR(7P) .sp .LP Draves, R. \fIRFC 3484, Default Address Selection for Internet Protocol version 6 (IPv6)\fR. Network Working Group. February 2003. .SH NOTES -.sp .LP IPv4-mapped addresses are not recommended. diff --git a/usr/src/man/man3socket/getifaddrs.3socket b/usr/src/man/man3socket/getifaddrs.3socket index 2f303b2835..69324271af 100644 --- a/usr/src/man/man3socket/getifaddrs.3socket +++ b/usr/src/man/man3socket/getifaddrs.3socket @@ -36,7 +36,6 @@ getifaddrs, freeifaddrs \- get interface addresses .fi .SH DESCRIPTION -.sp .LP The \fBgetifaddrs\fR() function is used to obtain the list of network interfaces on the local machine. A reference to a linked list of \fBifaddrs\fR @@ -106,20 +105,17 @@ The memory used by \fBgetifaddrs\fR() to back the list is dynamically allocated. It should be freed using \fBfreeifaddrs\fR(). .SH RETURN VALUES -.sp .LP If successful, \fBgetifaddrs\fR() returns the value \fB0\fR; otherwise it returns \fB\(mi1\fR and sets \fIerrno\fR to indicate the error. .SH ERRORS -.sp .LP The \fBgetifaddrs\fR() function may fail and set \fIerrno\fR for any of the errors specified for the library routines \fBioctl\fR(2), \fBsocket\fR(3SOCKET), and \fBmalloc\fR(3C). .SH ATTRIBUTES -.sp .TS box; c | c @@ -132,20 +128,17 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP \fBipadm\fR(1M), \fBifconfig\fR(1M), \fBioctl\fR(2), \fBmalloc\fR(3C), -\fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), \fBif_tcp\fR(7P), -\fBattributes\fR(5) +\fBsocket\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), \fBsocket.h\fR(3HEAD), +\fBif_tcp\fR(7P), \fBattributes\fR(5) .SH NOTES -.sp .LP On an illumos system, this function lists only interfaces with the \fBIFF_UP\fR flag set; see \fBif_tcp\fR(7P) and \fBifconfig\fR(1M) for more information. .SH BUGS -.sp .LP At present, this function only lists addresses from the \fBAF_INET\fR and \fBAF_INET6\fR families. Other families, such as \fBAF_LINK\fR, are not diff --git a/usr/src/man/man3socket/getpeername.3socket b/usr/src/man/man3socket/getpeername.3socket index f8625adbdf..d1a6072637 100644 --- a/usr/src/man/man3socket/getpeername.3socket +++ b/usr/src/man/man3socket/getpeername.3socket @@ -17,7 +17,6 @@ getpeername \- get name of connected peer .fi .SH DESCRIPTION -.sp .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 @@ -25,12 +24,10 @@ 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 -.sp .LP If successful, \fBgetpeername()\fR returns \fB0\fR; otherwise it returns \fB\(mi1\fR and sets \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP The call succeeds unless: .sp @@ -80,7 +77,6 @@ The argument \fIs\fR is not a socket. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -96,7 +92,7 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .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 index a7ab0d1318..98e134bddd 100644 --- a/usr/src/man/man3socket/getsockname.3socket +++ b/usr/src/man/man3socket/getsockname.3socket @@ -17,19 +17,16 @@ getsockname \- get socket name .fi .SH DESCRIPTION -.sp .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 -.sp .LP If successful, \fBgetsockname()\fR returns \fB0\fR; otherwise it returns \fB\(mi1\fR and sets \fIerrno\fR to indicate the error. .SH ERRORS -.sp .LP The call succeeds unless: .sp @@ -70,7 +67,6 @@ The argument \fIs\fR is not a socket. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -86,7 +82,6 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP -\fBbind\fR(3SOCKET), \fBgetpeername\fR(3SOCKET), \fBsocket\fR(3SOCKET), -\fBattributes\fR(5) +\fBbind\fR(3SOCKET), \fBgetpeername\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), +\fBsocket\fR(3SOCKET), \fBattributes\fR(5) diff --git a/usr/src/man/man3socket/getsourcefilter.3socket b/usr/src/man/man3socket/getsourcefilter.3socket index 22d231a763..a5239ef898 100644 --- a/usr/src/man/man3socket/getsourcefilter.3socket +++ b/usr/src/man/man3socket/getsourcefilter.3socket @@ -40,7 +40,6 @@ retrieve and set a socket's multicast filter .fi .SH DESCRIPTION -.sp .LP These functions allow applications to retrieve and modify the multicast filtering state for a tuple consisting of socket, interface, and multicast @@ -109,12 +108,10 @@ number of addresses in the \fIslist\fR array. The \fIslist\fR argument points to the array of source addresses to be included or excluded, depending on the \fIfmode\fR value. .SH RETURN VALUES -.sp .LP If successful, all four functions return \fB0\fR. Otherwise, they return \fB\(mi1\fR and set \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP These functions will fail if: .sp @@ -202,7 +199,6 @@ The source filter list is larger than that allowed by the implementation. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -220,9 +216,9 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP -\fBif_nametoindex\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBattributes\fR(5) +\fBif_nametoindex\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), +\fBattributes\fR(5) .sp .LP RFC 3678 diff --git a/usr/src/man/man3socket/recv.3socket b/usr/src/man/man3socket/recv.3socket index fa011c4481..5f987e43f0 100644 --- a/usr/src/man/man3socket/recv.3socket +++ b/usr/src/man/man3socket/recv.3socket @@ -30,7 +30,6 @@ recv, recvfrom, recvmsg \- receive a message from a socket .fi .SH DESCRIPTION -.sp .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 @@ -116,13 +115,11 @@ write requests are unaffected. 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 -.sp .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 -.sp .LP The \fBrecv()\fR, \fBrecvfrom()\fR, and \fBrecvmsg()\fR functions return errors under the following conditions: @@ -259,7 +256,6 @@ One of the \fIiov_len\fR values in the \fBmsg_iov\fR array member of the .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -277,9 +273,8 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .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), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), -\fBattributes\fR(5) +\fBsend\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), +\fBsocket.h\fR(3HEAD), \fBattributes\fR(5) diff --git a/usr/src/man/man3socket/sctp_bindx.3socket b/usr/src/man/man3socket/sctp_bindx.3socket index 3f94ca2846..60f3fe905d 100644 --- a/usr/src/man/man3socket/sctp_bindx.3socket +++ b/usr/src/man/man3socket/sctp_bindx.3socket @@ -18,7 +18,6 @@ sctp_bindx \- add or remove IP addresses to or from an SCTP socket .fi .SH DESCRIPTION -.sp .LP The \fBsctp_bindx()\fR function adds or removes addresses to or from an SCTP socket. If \fIsock\fR is an Internet Protocol Version 4 (IPv4) socket, @@ -68,13 +67,11 @@ addresses to or from an established association. In such a case, messages are exchanged between the SCTP endpoints to update the address lists for that association if both endpoints support dynamic address reconfiguration. .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_bindx()\fR function returns \fB0\fR. Otherwise, the function returns \fB-1\fR and sets \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP The \fBsctp_bindx()\fR call fails under the following conditions. .sp @@ -123,7 +120,6 @@ The last address is requested to be removed from an established association. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -141,14 +137,13 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBbind\fR(3SOCKET), \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBlisten\fR(3SOCKET), \fBsctp_freeladdrs\fR(3SOCKET), \fBsctp_freepaddrs\fR(3SOCKET), \fBsctp_getladdrs\fR(3SOCKET), -\fBsctp_getpaddrs\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBinet\fR(7P), -\fBinet6\fR(7P), \fBip\fR(7P), \fBip6\fR(7P), \fBsctp\fR(7P) +\fBsctp_getpaddrs\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), +\fBinet\fR(7P), \fBinet6\fR(7P), \fBip\fR(7P), \fBip6\fR(7P), \fBsctp\fR(7P) + .SH NOTES -.sp .LP IPv4-mapped addresses are not recommended. diff --git a/usr/src/man/man3socket/sctp_getladdrs.3socket b/usr/src/man/man3socket/sctp_getladdrs.3socket index 255b0ca435..f343921788 100644 --- a/usr/src/man/man3socket/sctp_getladdrs.3socket +++ b/usr/src/man/man3socket/sctp_getladdrs.3socket @@ -24,7 +24,6 @@ SCTP socket .fi .SH DESCRIPTION -.sp .LP The \fBsctp_getladdrs()\fR function queries addresses to which an SCTP socket is bound. The \fBsctp_freeladdrs()\fR function releases resources that are @@ -52,13 +51,11 @@ The \fBsctp_freeladdrs()\fR function frees the resources allocated by \fBsctp_getladdrs()\fR. The \fIaddrs\fR parameter is the array of addresses allocated by \fBsctp_getladdrs()\fR. .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_getladdrs()\fR function returns the number of addresses in the \fIaddrs\fR array. Otherwise, the function returns \fB-1\fR and sets \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP The \fBsctp_getladdrs()\fR call fails under the following conditions. .sp @@ -98,7 +95,6 @@ The \fIid\fR argument is an invalid socket. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -116,9 +112,9 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBbind\fR(3SOCKET), \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBsctp_freepaddrs\fR(3SOCKET), \fBsctp_getpaddrs\fR(3SOCKET), +\fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBattributes\fR(5), \fBinet\fR(7P), \fBinet6\fR(7P), \fBip\fR(7P), \fBip6\fR(7P), \fBsctp\fR(7P) diff --git a/usr/src/man/man3socket/sctp_getpaddrs.3socket b/usr/src/man/man3socket/sctp_getpaddrs.3socket index d816a3723c..c2558279b2 100644 --- a/usr/src/man/man3socket/sctp_getpaddrs.3socket +++ b/usr/src/man/man3socket/sctp_getpaddrs.3socket @@ -24,7 +24,6 @@ association .fi .SH DESCRIPTION -.sp .LP The \fBsctp_getpaddrs()\fR queries the peer addresses in an SCTP association. The \fBsctp_freepaddrs()\fR function releases resources that are allocated to @@ -51,13 +50,11 @@ The \fBsctp_freepaddrs()\fR function frees the resources allocated by \fBsctp_getpaddrs()\fR. The \fIaddrs\fR parameter is the array of addresses allocated by \fBsctp_getpaddrs()\fR. .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_getpaddrs()\fR function returns the number of addresses in the \fIaddrs\fR array. Otherwise, the function returns \fB-1\fR and sets \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP The \fBsctp_getpaddrs()\fR succeeds unless one of the following conditions exist. @@ -108,7 +105,6 @@ The specified socket is not connected. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -126,9 +122,9 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBbind\fR(3SOCKET), \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBsctp_freeladdrs\fR(3SOCKET), \fBsctp_getladdrs\fR(3SOCKET), +\fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBattributes\fR(5), \fBinet\fR(7P), \fBinet6\fR(7P), \fBip\fR(7P), \fBip6\fR(7P), \fBsctp\fR(7P) diff --git a/usr/src/man/man3socket/sctp_opt_info.3socket b/usr/src/man/man3socket/sctp_opt_info.3socket index 394b60d5a8..4323efb5f4 100644 --- a/usr/src/man/man3socket/sctp_opt_info.3socket +++ b/usr/src/man/man3socket/sctp_opt_info.3socket @@ -19,7 +19,6 @@ sctp_opt_info \- examine SCTP level options for an SCTP endpoint .fi .SH DESCRIPTION -.sp .LP The \fBsctp_opt_info()\fR returns SCTP level options associated with the SCTP socket \fIsock\fR. If \fIsock\fR is a one-to-many style socket, \fIid\fR refers @@ -274,13 +273,11 @@ where: .RE .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_opt_info()\fR function returns \fB0\fR. Otherwise, the function returns \fB-1\fR and sets \fBerrno\fR to indicate the error. .SH ERRORS -.sp .LP The \fBsctp_opt_info()\fR call fails under the following conditions. .sp @@ -339,7 +336,6 @@ The address family for the peer's address is other than \fBAF_INET\fR or .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -357,8 +353,7 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBgetsockopt\fR(3SOCKET), -\fBsetsockopt\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBinet\fR(7P), -\fBinet6\fR(7P), \fBip\fR(7P), \fBip6\fR(7P), \fBsctp\fR(7P) +\fBsetsockopt\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), +\fBinet\fR(7P), \fBinet6\fR(7P), \fBip\fR(7P), \fBip6\fR(7P), \fBsctp\fR(7P) diff --git a/usr/src/man/man3socket/sctp_peeloff.3socket b/usr/src/man/man3socket/sctp_peeloff.3socket index 00449dfbbb..6dd770f3b1 100644 --- a/usr/src/man/man3socket/sctp_peeloff.3socket +++ b/usr/src/man/man3socket/sctp_peeloff.3socket @@ -20,7 +20,6 @@ to create a one-to-one STP socket .fi .SH DESCRIPTION -.sp .LP The \fBsctp_peeloff()\fR function branches off an existing association from a one-to-many style SCTP socket into a separate socket file descriptor. The @@ -31,13 +30,11 @@ to operations allowed on a one-to-one style SCTP socket. The \fIsock\fR argument is a one-to-many socket. The association specified by the \fIid\fR argument is branched off \fIsock\fR. .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_peeloff()\fR function returns the file descriptor that references the branched-off socket. The function returns \fB-1\fR if an error occurs. .SH ERRORS -.sp .LP The \fBsctp_peeloff()\fR function fails under the following conditions. .sp @@ -69,7 +66,6 @@ Failure to create a new user file descriptor or file structure. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -87,6 +83,5 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBsocket\fR(3SOCKET), \fBsctp\fR(7P) diff --git a/usr/src/man/man3socket/sctp_recvmsg.3socket b/usr/src/man/man3socket/sctp_recvmsg.3socket index 8c5018b48e..875afc6714 100644 --- a/usr/src/man/man3socket/sctp_recvmsg.3socket +++ b/usr/src/man/man3socket/sctp_recvmsg.3socket @@ -20,7 +20,6 @@ sctp_recvmsg \- receive message from an SCTP socket .fi .SH DESCRIPTION -.sp .LP The \fBsctp_recvmsg()\fR function receives a message from the SCTP endpoint \fIs\fR. @@ -71,12 +70,10 @@ The \fIsinfo\fR parameter is filled in only when the caller has enabled \fBsctp_data_io_events\fR by calling \fBsetsockopt()\fR with the socket option \fBSCTP_EVENTS\fR. .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_recvmsg()\fR function returns the number of bytes received. The function returns \fB-1\fR if an error occurs. .SH ERRORS -.sp .LP The \fBsctp_recvmsg()\fR function fails under the following conditions. .sp @@ -116,7 +113,6 @@ There is no established association. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -134,10 +130,9 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET), \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBlisten\fR(3SOCKET), -\fBrecvmsg\fR(3SOCKET), \fBsctp_opt_info\fR(3SOCKET), -\fBsetsockopt\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), +\fBrecvmsg\fR(3SOCKET), \fBsctp_opt_info\fR(3SOCKET), \fBsetsockopt\fR(3SOCKET), +\fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), \fBsctp\fR(7P) diff --git a/usr/src/man/man3socket/sctp_send.3socket b/usr/src/man/man3socket/sctp_send.3socket index 81322ed3c1..3a44106596 100644 --- a/usr/src/man/man3socket/sctp_send.3socket +++ b/usr/src/man/man3socket/sctp_send.3socket @@ -19,7 +19,6 @@ sctp_send \- send message from an SCTP socket .fi .SH DESCRIPTION -.sp .LP The \fBsctp_send()\fR function sends messages from one-to-one and one-to-many style SCTP endpoints. The following parameters can be set: @@ -61,12 +60,10 @@ parameter to send a message to the association represented in the ID. .LP Flags supported for \fBsctp_send()\fR are reserved for future use. .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_send()\fR function returns the number of bytes sent. The function returns \fB-1\fR if an error occurs. .SH ERRORS -.sp .LP The \fBsctp_send()\fR function fails under the following conditions. .sp @@ -163,7 +160,6 @@ or \fBAF_INET6\fR. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -181,7 +177,6 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET), \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBlisten\fR(3SOCKET), diff --git a/usr/src/man/man3socket/sctp_sendmsg.3socket b/usr/src/man/man3socket/sctp_sendmsg.3socket index 382e93b35f..281481a340 100644 --- a/usr/src/man/man3socket/sctp_sendmsg.3socket +++ b/usr/src/man/man3socket/sctp_sendmsg.3socket @@ -21,7 +21,6 @@ sctp_sendmsg \- send message from an SCTP socket .fi .SH DESCRIPTION -.sp .LP The \fBsctp_sendmsg()\fR function sends a message from the SCTP endpoint \fIs\fR. @@ -144,12 +143,10 @@ but it cannot be used subsequently on an existing association. Since \fBsctp_sendmsg()\fR always uses 0 internally as the association ID, it is not suitable for use on one-to-many sockets. .SH RETURN VALUES -.sp .LP Upon successful completion, the \fBsctp_sendmsg()\fR function returns the number of bytes sent. The function returns \fB-1\fR if an error occurs. .SH ERRORS -.sp .LP The \fBsctp_sendmsg()\fR function will fail if: .sp @@ -244,7 +241,6 @@ or \fBAF_INET6\fR. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -262,9 +258,8 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET), \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBlisten\fR(3SOCKET), -\fBsendmsg\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), -\fBattributes\fR(5), \fBsctp\fR(7P) +\fBsendmsg\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), +\fBsocket.h\fR(3HEAD), \fBattributes\fR(5), \fBsctp\fR(7P) diff --git a/usr/src/man/man3socket/send.3socket b/usr/src/man/man3socket/send.3socket index 249b746b27..b37df998f7 100644 --- a/usr/src/man/man3socket/send.3socket +++ b/usr/src/man/man3socket/send.3socket @@ -29,7 +29,6 @@ send, sendto, sendmsg \- send a message from a socket .fi .SH DESCRIPTION -.sp .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 @@ -86,12 +85,10 @@ It is used only by diagnostic or routing programs. .LP See \fBrecv\fR(3SOCKET) for a description of the \fBmsghdr\fR structure. .SH RETURN VALUES -.sp .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 -.sp .LP The \fBsend()\fR, \fBsendto()\fR, and \fBsendmsg()\fR functions return errors under the following conditions: @@ -248,7 +245,6 @@ longer connected. In the latter case, if the socket is of type .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -266,8 +262,8 @@ MT-Level Safe .TE .SH SEE ALSO -.sp .LP \fBfcntl\fR(2), \fBpoll\fR(2), \fBwrite\fR(2), \fBconnect\fR(3SOCKET), \fBgetsockopt\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBselect\fR(3C), -\fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), \fBattributes\fR(5) +\fBsockaddr\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBsocket.h\fR(3HEAD), +\fBattributes\fR(5) diff --git a/usr/src/man/man3socket/sockaddr.3socket b/usr/src/man/man3socket/sockaddr.3socket new file mode 100644 index 0000000000..842100d88d --- /dev/null +++ b/usr/src/man/man3socket/sockaddr.3socket @@ -0,0 +1,562 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright (c) 2014, Joyent, Inc. +.\" +.Dd Nov 13, 2014 +.Dt SOCKADDR 3SOCKET +.Os +.Sh NAME +.Nm sockaddr , +.Nm sockaddr_dl , +.Nm sockaddr_in , +.Nm sockaddr_in6 , +.Nm sockaddr_ll , +.Nm sockaddr_storage , +.Nm sockaddr_un +.Nd Socket Address Structures +.Sh SYNOPSIS +.In sys/socket.h +.Lp +.Sy struct sockaddr +.Em sock ; +.Lp +.In sys/socket.h +.In net/if_dl.h +.Lp +.Sy struct sockaddr_dl +.Em dl_sock ; +.Lp +.In sys/socket.h +.In netinet/in.h +.Lp +.Sy struct sockaddr_in +.Em in_sock ; +.Lp +.In sys/socket.h +.In netinet/in6.h +.Lp +.Sy struct sockaddr_in6 +.Em in6_sock ; +.Lp +.In sys/socket.h +.Lp +.Sy struct sockaddr_ll +.Em ll_sock ; +.Lp +.In sys/socket.h +.Lp +.Sy struct sockaddr_storage +.Em storage_sock ; +.Lp +.In sys/un.h +.Lp +.Sy struct sockaddr_un +.Em un_sock ; +.Sh DESCRIPTION +The +.Nm +family of structures are designed to represent network addresses for +different networking protocols. The structure +.Sy struct sockaddr +is a generic structure that is used across calls to various socket +library routines +.Po +.Xr libsocket 3LIB +.Pc +such as +.Xr accept 3SOCKET +and +.Xr bind 3SOCKET . +Applications do not use the +.Sy struct sockaddr +directly, but instead cast the appropriate networking family specific +.Nm +structure to a +.Sy struct sockaddr * . +.Lp +Every structure in the +.Nm +family begins with a member of the same type, the +.Sy sa_family_t , +though the different structures all have different names for the member. +For example, the structure +.Sy struct sockaddr +has the following members defined: +.Bd -literal -offset indent +sa_family_t sa_family /* address family */ +char sa_data[] /* socket address (variable-length data) */ +.Ed +.Lp +The member +.Em sa_family +corresponds to the socket family that's actually in use. The following +table describes the mapping between the address family and the +corresponding socket structure that's used. Note that both the generic +.Sy struct sockaddr +and the +.Sy struct sockaddr_storage +are not included, because these are both generic structures. More on the +.Sy struct sockaddr_storage +can be found in the next section. +.Bl -column -offset indent ".Sy Socket Structure" ".Sy Address Family" +.It Sy Socket Structure Ta Sy Address Family +.It struct sockaddr_dl Ta AF_LINK +.It struct sockaddr_in Ta AF_INET +.It struct sockaddr_in6 Ta AF_INET6 +.It struct sockaddr_ll Ta AF_PACKET +.It struct sockaddr_un Ta AF_UNIX +.El +.Ss struct sockaddr_storage +The +.Sy sockaddr_storage +structure is a +.Nm +that is not associated with an address family. Instead, it is large +enough to hold the contents of any of the other +.Nm +structures. It can be used to embed sufficient storage for a +.Sy sockaddr +of any type within a larger structure. +.Lp +The structure only has a single member defined. While there are other +members that are used to pad out the size of the +.Sy struct sockaddr_storage , +they are not defined and must not be consumed. The only valid +member is: +.Bd -literal -offset indent +sa_family_t ss_family /* address family */ +.Ed +.Lp +For example, +.Sy struct sockaddr_storage +is useful when running a service that accepts traffic over both +.Sy IPv4 +and +.Sy IPv6 +where it is common to use a single socket for both address families. In that +case, rather than guessing whether a +.Sy struct sockaddr_in +or a +.Sy struct sockaddr_in6 +is more appropriate, one can simply use a +.Sy struct sockaddr_storage +and cast to the appropriate family-specific structure type based on the +value of the member +.Em ss_family . +.Ss struct sockaddr_in +The +.Sy sockaddr_in +is the socket type which is used for for the Internet Protocol version +four (IPv4). It has the following members defined: +.Bd -literal -offset indent +sa_family_t sin_family /* address family */ +in_port_t sin_port /* IP port */ +struct in_addr sin_addr /* IP address */ +.Ed +.Lp +The member +.Em sin_family +must always have the value +.Sy AF_INET +for +.Sy IPv4 . +The members +.Em sin_port +and +.Em sin_addr +describe the IP address and IP port to use. In the case of a call to +.Xr connect 3SOCKET +these represent the remote IP address and port to which the connection +is being made. In the case of +.Xr bind 3SOCKET +these represent the IP address and port on the local host to which the socket +is to be bound. In the case of +.Xr accept 3SOCKET +these represent the remote IP address and port of the machine whose +connection was accepted. +.Lp +The member +.Em sin_port +is always stored in +.Sy Network Byte Order . +On many systems, this differs from the native host byte order. +Applications should read from the member with the function +.Xr ntohs 3SOCKET +and write to the member with the function +.Xr htons 3SOCKET . +The member +.Em sin_addr +is the four byte IPv4 address. It is also stored in network byte order. +The common way to write out the address is to use the function +.Xr inet_pton 3SOCKET +which converts between a human readable IP address such as "10.1.2.3" +and the corresponding representation. +.Lp +Example 1 shows how to prepare an IPv4 socket and deal with +network byte-order. See +.Xr inet 7P +and +.Xr ip 7P +for more information on IPv4, socket options, etc. +.Ss struct sockaddr_in6 +The +.Sy sockaddr_in6 +structure is the +.Nm +for the Internet Protocol version six (IPv6). Unlike the +.Sy struct sockaddr_in , +the +.Sy struct sockaddr_in6 +has additional members beyond those shown here which are required to be +initialized to zero through a function such as +.Xr bzero 3C +or +.Xr memset 3C . +If the entire +.Sy struct sockaddr_in6 +is not zeroed before use, applications will experience undefined behavior. The +.Sy struct sockaddr_in6 +has the following public members: +.Bd -literal -offset indent +sa_family_t sin6_family /* address family */ +in_port_t sin6_port /* IPv6 port */ +struct in6_addr sin6_addr /* IPv6 address */ +uint32_t sin6_flowinfo; /* traffic class and flow info */ +uint32_t sin6_scope_id; /* interface scope */ +.Ed +.Lp +The member +.Em sin6_family +must always have the value +.Sy AF_INET6 . +The members +.Em sin6_port +and +.Em sin6_addr +are the IPv6 equivalents of the +.Sy struct sockaddr_in +.Em sin_port +and +.Em sin_addr . +Like their IPv4 counterparts, both of these members must be in network +byte order. The member +.Em sin6_port +describes the IPv6 port and should be manipulated with the functions +.Xr ntohs 3SOCKET +and +.Xr htons 3SOCKET . +The member +.Em sin6_addr +describes the 16-byte IPv6 address. In addition to the function +.Xr inet_pton 3SOCKET , +the header file +.In netinet/in.h +defines many macros for manipulating and testing IPv6 addresses. +.Lp +The member +.Em sin6_flowinfo +contains the traffic class and flow label associated with the IPv6 +header. The member +.Em sin6_scope_id +may contain an identifier which varies based on the scope of the address +in +.Em sin6_addr . +Applications do not need to initialize +.Em sin6_scope_id ; +it will be populated by the operating system as a result of various library +calls. +.Lp +Example 2 shows how to prepare an IPv6 socket. For more information on +IPv6, please see +.Xr inet6 7P +and +.Xr ip6 7P . +.Ss struct sockaddr_un +The +.Sy sockaddr_un +structure specifies the address of a socket used to communicate between +processes running on a single system, commonly known as a +.Em UNIX domain socket . +Sockets of this type are identified by a path in the file system. The +.Sy struct sockaddr_un +has the following members: +.Bd -literal -offset indent +sa_family_t sun_family /* address family */ +char sun_path[108] /* path name */ +.Ed +.Lp +The member +.Em sun_family +must always have the value +.Sy AF_UNIX . +The member +.Em sun_path +is populated with a +.Sy NUL +terminated array of characters that specify a file system path. The maximum +length of any such path, including the +.Sy NUL +terminator, is 108 bytes. +.Ss struct sockaddr_dl +The +.Sy sockaddr_dl +structure is used to describe a layer 2 link-level address. This is used +as part of various socket ioctls, such as those for +.Xr arp 7P . +The structure has the following members: +.Bd -literal -offset indent +ushort_t sdl_family; /* address family */ +ushort_t sdl_index; /* if != 0, system interface index */ +uchar_t sdl_type; /* interface type */ +uchar_t sdl_nlen; /* interface name length */ +uchar_t sdl_alen; /* link level address length */ +uchar_t sdl_slen; /* link layer selector length */ +char sdl_data[244]; /* contains both if name and ll address +.Ed +.Lp +The member +.Em sdl_family +must always have the value +.Sy AF_LINK . +When the member +.Em sdl_index +is non-zero this refers to the interface identifier that corresponds to +the +.Sy struct sockaddr_dl . +This identifier is the same identifier that's shown by tools like +.Xr ifconfig 1M +and used in the SIOC* set of socket ioctls. The member +.Em sdl_type +refers to the media that is used for the socket. The most common case is +that the medium for the interface is Ethernet which has the value +.Sy IFT_ETHER . +The full set of types is derived from RFC1573 and recorded in the file +.In net/if_types.h . +The member +.Em sdl_slen +describes the length of a selector, if it exists, for the specified +medium. This is used in protocols such as Trill. +.Lp +The +.Em sdl_data , +.Em sdl_nlen +and +.Em sdl_alen +members together describe a character string containing the interface name and +the link-layer network address. The name starts at the beginning of +.Em sdl_data , +i.e. at +.Em sdl_data[0] . +The name of the interface occupies the next +.Em sdl_nlen +bytes and is not +.Sy NUL +terminated. The link-layer network address begins immediately after the +interface name, and is +.Em sdl_alen +bytes long. The macro +.Sy LLADDR(struct sockaddr_dl *) +returns the start of the link-layer network address. +The interpretation of the link-layer address depends on the value of +.Em sdl_type . +For example, if the type is +.Sy IFT_ETHER +then the address is expressed as a 6-byte MAC address. +.Ss struct sockaddr_ll +The +.Sy sockaddr_ll +is used as part of a socket type which is responsible for packet +capture: +.Sy AF_PACKET +sockets. It is generally designed for use with Ethernet networks. The members +of the +.Sy struct sockaddr_ll +are: +.Bd -literal -offset indent +uint16_t sll_family; /* address family */ +uint16_t sll_protocol; /* link layer protocol */ +int32_t sll_ifindex; /* interface index */ +uint16_t sll_hatype; /* ARP hardware type */ +uint8_t sll_pkttype; /* packet type */ +uint8_t sll_halen; /* hardware address length */ +uint8_t sll_addr[8]; /* hardware type */ +.Ed +.Lp +The member +.Em sll_family +must be +.Sy AF_PACKET . +The member +.Em sll_protocol +refers to a link-layer protocol. For example, when capturing Ethernet frames +the value of +.Em sll_protocol +is the Ethertype. This member is written in network byte order and +applications should use +.Xr htons 3SOCKET +and +.Xr ntohs 3SOCKET +to read and write the member. +.Lp +The member +.Em sll_ifindex +is the interface's index. It is used as an identifier in various ioctls +and included in the output of +.Xr ifconfig 1M . +When calling +.Xr bind 3SOCKET +it should be filled in with the index that corresponds to the interface +for which packets should be captured on. +.Lp +The member +.Em sll_pkttype +describes the type of the packet based on a list of types in the header +file +.In netpacket/packet.h . +These types include: +.Sy PACKET_OUTGOING , +a packet that was leaving the host and has been looped back for packet capture; +.Sy PACKET_HOST , +a packet that was destined for this host; +.Sy PACKET_BROADCAST , +a packet that was broadcast across the link-layer; +.Sy PACKET_MULTICAST , +a packet that was sent to a link-layer multicast address; and +.Sy PACKET_OTHERHOST , +a packet that was captured only because the device in question was in +promiscuous mode. +.Lp +The member +.Em sll_hatype +contains the hardware type as defined by +.Xr arp 7P . +The list of types can be found in +.In net/if_arp.h . +The member +.Em sll_halen +contains the length, in bytes, of the hardware address, while the member +.Em sll_addr +contains the actual address in network byte order. +.Sh EXAMPLES +.Sy Example 1 +Preparing an IPv4 +.Sy sockaddr_in +to connect to a remote host +.Lp +The following example shows how one would open a socket and prepare it +to connect to the remote host whose address is the IP address 127.0.0.1 +on port 80. This program should be compiled with the C compiler +.Sy cc +and linked against the libraries libsocket and libnsl. If this example +was named ip4.c, then the full link line would be +.Ic cc ip4.c -lsocket -lnsl . +.Bd -literal +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + int sock; + struct sockaddr_in in; + + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + perror("socket"); + return (1); + } + + bzero(&in, sizeof (struct sockaddr_in)); + in.sin_family = AF_INET; + in.sin_port = htons(80); + if (inet_pton(AF_INET, "127.0.0.1", &in.sin_addr) != 1) { + perror("inet_pton"); + return (1); + } + + if (connect(sock, (struct sockaddr *)&in, + sizeof (struct sockaddr_in)) != 0) { + perror("connect"); + return (1); + } + + /* use socket */ + + return (0); +} +.Ed +.Lp +.Sy Example 2 +Preparing an IPv6 +.Sy sockaddr_in6 +to bind to a local address +.Lp +The following example shows how one would open a socket and prepare it +to bind to the local IPv6 address ::1 port on port 12345. This program +should be compiled with the C compiler +.Sy cc +and linked aginst the libraries libsocket and libnsl. If this example +was named ip6.c, then the full compiler line would be +.Ic cc ip6.c -lsocket -lnsl . +.Bd -literal +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + int sock6; + struct sockaddr_in6 in6; + + if ((sock6 = socket(AF_INET6, SOCK_STREAM, 0)) < 0) { + perror("socket"); + return (1); + } + + bzero(&in6, sizeof (struct sockaddr_in6)); + in6.sin6_family = AF_INET6; + in6.sin6_port = htons(12345); + if (inet_pton(AF_INET6, "::1", &in6.sin6_addr) != 1) { + perror("inet_pton"); + return (1); + } + + if (bind(sock6, (struct sockaddr *)&in6, + sizeof (struct sockaddr_in6)) != 0) { + perror("bind"); + return (1); + } + + /* use server socket */ + + return (0); +} +.Ed +.Sh SEE ALSO +.Xr socket 3HEAD , +.Xr uh.h 3HEAD , +.Xr accept 3SOCKET , +.Xr bind 3SOCKET , +.Xr connect 3SOCKET , +.Xr socket 3SOCKET , +.Xr arp 7P , +.Xr inet 7P , +.Xr inet6 7P , +.Xr ip 7P , +.Xr ip6 7P , diff --git a/usr/src/man/man3xnet/accept.3xnet b/usr/src/man/man3xnet/accept.3xnet index 79037af1f8..2b78155438 100644 --- a/usr/src/man/man3xnet/accept.3xnet +++ b/usr/src/man/man3xnet/accept.3xnet @@ -22,7 +22,6 @@ accept \- accept a new connection on a socket .fi .SH DESCRIPTION -.sp .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 @@ -91,18 +90,15 @@ requests and O_NONBLOCK is set on the file descriptor for the socket, The accepted socket cannot itself accept more connections. The original socket remains open and can accept more connections. .SH USAGE -.sp .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 -.sp .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 -.sp .LP The \fBaccept()\fR function will fail if: .sp @@ -243,7 +239,6 @@ been initialized. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -261,7 +256,7 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .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 index 45772c3ff8..12be69fbe3 100644 --- a/usr/src/man/man3xnet/bind.3xnet +++ b/usr/src/man/man3xnet/bind.3xnet @@ -22,7 +22,6 @@ bind \- bind a name to a socket .fi .SH DESCRIPTION -.sp .LP The \fBbind()\fR function assigns an \fIaddress\fR to an unnamed socket. Sockets created with \fBsocket\fR(3XNET) function are initially unnamed. They @@ -65,17 +64,14 @@ Specifies the length of the \fBsockaddr\fR structure pointed to by the The socket in use may require the process to have appropriate privileges to use the \fBbind()\fR function. .SH USAGE -.sp .LP An application program can retrieve the assigned socket name with the \fBgetsockname\fR(3XNET) function. .SH RETURN VALUES -.sp .LP Upon successful completion, \fBbind()\fR returns 0. Otherwise, \(mi1 is returned and \fBerrno\fR is set to indicate the error. .SH ERRORS -.sp .LP The \fBbind()\fR function will fail if: .sp @@ -296,7 +292,6 @@ There were insufficient STREAMS resources for the operation to complete. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -314,8 +309,8 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .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 index 50c08bb6c2..14e2ab5494 100644 --- a/usr/src/man/man3xnet/connect.3xnet +++ b/usr/src/man/man3xnet/connect.3xnet @@ -21,7 +21,6 @@ connect \- connect a socket .fi .SH DESCRIPTION -.sp .LP The \fBconnect()\fR function requests a connection to be made on a socket. The function takes the following arguments: @@ -100,18 +99,15 @@ for writing. The socket in use may require the process to have appropriate privileges to use the \fBconnect()\fR function. .SH USAGE -.sp .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 -.sp .LP Upon successful completion, \fBconnect()\fR returns 0. Otherwise, \(mi1 is returned and \fBerrno\fR is set to indicate the error. .SH ERRORS -.sp .LP The \fBconnect()\fR function will fail if: .sp @@ -388,7 +384,6 @@ The socket is listening and can not be connected. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -406,8 +401,8 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .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), diff --git a/usr/src/man/man3xnet/getnameinfo.3xnet b/usr/src/man/man3xnet/getnameinfo.3xnet index 60cef94c6c..b7f43685bd 100644 --- a/usr/src/man/man3xnet/getnameinfo.3xnet +++ b/usr/src/man/man3xnet/getnameinfo.3xnet @@ -24,7 +24,6 @@ getnameinfo \- get name information .fi .SH DESCRIPTION -.sp .LP The \fBgetnameinfo()\fR function translates a socket address to a node name and service location, all of which are defined as in \fBgetaddrinfo\fR(3XNET). @@ -94,7 +93,6 @@ datagram service (\fBSOCK_DGRAM\fR). The default behavior assumes that the service is a stream service (\fBSOCK_STREAM\fR). .RE .SH RETURN VALUES -.sp .LP A 0 return value for \fBgetnameinfo()\fR indicates successful completion; a non-zero return value indicates failure. The possible values for the failures @@ -105,7 +103,6 @@ Upon successful completion, \fBgetnameinfo()\fR returns the node and service names, if requested, in the buffers provided. The returned names are always null-terminated strings. .SH ERRORS -.sp .LP The \fBgetnameinfo()\fR function will fail if: .sp @@ -175,7 +172,6 @@ A system error occurred. The error code can be found in \fBerrno\fR. .RE .SH USAGE -.sp .LP If the returned values are to be used as part of any further name resolution (for example, passed to \fBgetaddrinfo()\fR), applications should provide @@ -186,7 +182,6 @@ Given the IPv4-mapped IPv6 address "::ffff:1.2.3.4", the implementation performs a lookup as if the socket address structure contains the IPv4 address "1.2.3.4". .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -204,13 +199,12 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP +\fBsockaddr\fR(3SOCKET), \fBgai_strerror\fR(3XNET), \fBgetaddrinfo\fR(3XNET), \fBgetservbyname\fR(3XNET), \fBsocket\fR(3XNET), \fBattributes\fR(5), \fBstandards\fR(5) .SH NOTES -.sp .LP The IPv6 unspecified address ("::") and the IPv6 loopback address ("::1") are not IPv4-compatible addresses. If the address is the IPv6 unspecified address diff --git a/usr/src/man/man3xnet/getpeername.3xnet b/usr/src/man/man3xnet/getpeername.3xnet index ed96bd2bf2..4ed8a0bb75 100644 --- a/usr/src/man/man3xnet/getpeername.3xnet +++ b/usr/src/man/man3xnet/getpeername.3xnet @@ -21,7 +21,6 @@ getpeername \- get the name of the peer socket .fi .SH DESCRIPTION -.sp .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 @@ -37,12 +36,10 @@ 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 -.sp .LP Upon successful completion, 0 is returned. Otherwise, \(mi1 is returned and \fBerrno\fR is set to indicate the error. .SH ERRORS -.sp .LP The \fBgetpeername()\fR function will fail if: .sp @@ -123,7 +120,6 @@ complete. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -141,7 +137,7 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .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 index 9afeb8cb07..73d3e5206e 100644 --- a/usr/src/man/man3xnet/getsockname.3xnet +++ b/usr/src/man/man3xnet/getsockname.3xnet @@ -21,7 +21,6 @@ getsockname \- get the socket name .fi .SH DESCRIPTION -.sp .LP The \fBgetsockname()\fR function retrieves the locally-bound name of the specified socket, stores this address in the \fBsockaddr\fR structure pointed @@ -36,14 +35,12 @@ If the actual length of the address is greater than the length of the supplied 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 -.sp .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 -.sp .LP The \fBgetsockname()\fR function will fail: .sp @@ -115,7 +112,6 @@ complete. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -133,7 +129,7 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .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/recvfrom.3xnet b/usr/src/man/man3xnet/recvfrom.3xnet index 2d1eec2fcc..1e03959d4d 100644 --- a/usr/src/man/man3xnet/recvfrom.3xnet +++ b/usr/src/man/man3xnet/recvfrom.3xnet @@ -22,7 +22,6 @@ recvfrom \- receive a message from a socket .fi .SH DESCRIPTION -.sp .LP The \fBrecvfrom()\fR function receives a message from a connection-mode or connectionless-mode socket. It is normally used with connectionless-mode @@ -161,19 +160,16 @@ 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 -.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, \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 -.sp .LP The \fBrecvfrom()\fR function will fail if: .sp @@ -316,7 +312,6 @@ complete. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -334,9 +329,9 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP -\fBpoll\fR(2), \fBrecv\fR(3XNET), \fBrecvmsg\fR(3XNET), \fBselect\fR(3C) +\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/sendto.3xnet b/usr/src/man/man3xnet/sendto.3xnet index 9c9e75bc57..a3e6bc81f5 100644 --- a/usr/src/man/man3xnet/sendto.3xnet +++ b/usr/src/man/man3xnet/sendto.3xnet @@ -21,7 +21,6 @@ sendto \- send a message on a socket .fi .SH DESCRIPTION -.sp .LP The \fBsendto()\fR function sends a message through a connection-mode or connectionless-mode socket. If the socket is connectionless-mode, the message @@ -53,7 +52,6 @@ descriptor does have \fBO_NONBLOCK\fR set, \fBsendto()\fR will fail. The socket in use may require the process to have appropriate privileges to use the \fBsendto()\fR function. .SH PARAMETERS -.sp .LP The function takes the following arguments: .sp @@ -133,17 +131,14 @@ Specifies the length of the \fBsockaddr\fR structure pointed to by the .RE .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, \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 -.sp .LP The \fBsendto()\fR function will fail if: .sp @@ -427,7 +422,6 @@ length exceeds \fIPATH_MAX\fR. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -445,9 +439,9 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp .LP -\fBpoll\fR(2), \fBgetsockopt\fR(3XNET), \fBrecv\fR(3XNET), +\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), diff --git a/usr/src/man/man7p/arp.7p b/usr/src/man/man7p/arp.7p index 70b86e0ac3..5489ce3aca 100644 --- a/usr/src/man/man7p/arp.7p +++ b/usr/src/man/man7p/arp.7p @@ -39,7 +39,6 @@ arp, ARP \- Address Resolution Protocol .fi .SH DESCRIPTION -.sp .LP ARP is a protocol used to map dynamically between Internet Protocol (IP) and Ethernet addresses. It is used by all Ethernet datalink providers (network @@ -57,7 +56,6 @@ caches the new mapping and transmits any pending message. \fBARP\fR will queue a maximum of four packets while awaiting a response to a mapping request. ARP keeps only the first four transmitted packets. .SH APPLICATION PROGRAMMING INTERFACE -.sp .LP The STREAMS device \fB/dev/arp\fR is not a Transport Level Interface (\fBTLI\fR) transport provider and may not be used with the \fBTLI\fR @@ -280,7 +278,6 @@ excess of conflicts. ARP also handles UNARP messages received from other nodes. It does not generate these messages. .SH PACKET EVENTS -.sp .LP The \fBarp\fR driver registers itself with the netinfo interface. To gain access to these events, a handle from net_protocol_lookup must be acquired by @@ -348,7 +345,6 @@ Pointer to the mblk_t with the ARP header in it. .RE .SH NETWORK INTERFACE EVENTS -.sp .LP In addition to events describing packets as they move through the system, it is also possible to receive notification of events relating to network @@ -375,10 +371,9 @@ A network interface is no longer associated with ARP. .RE .SH SEE ALSO -.sp .LP -\fBarp\fR(1M), \fBifconfig\fR(1M), \fBprivileges\fR(5), \fBif_tcp\fR(7P), -\fBinet\fR(7P), \fBnetinfo\fR(9F) +\fBarp\fR(1M), \fBifconfig\fR(1M), \fBsockaddr\fR(3SOCKET), \fBprivileges\fR(5), +\fBif_tcp\fR(7P), \fBinet\fR(7P), \fBnetinfo\fR(9F) .sp .LP Plummer, Dave, \fIAn Ethernet Address Resolution Protocol\fR or \fIConverting @@ -388,7 +383,6 @@ Ethernet Hardware\fR, RFC 826, STD 0037, November 1982. .LP Malkin, Gary, \fIARP Extension - UNARP, RFC 1868\fR, November, 1995 .SH DIAGNOSTICS -.sp .LP Several messages can be written to the system logs (by the IP module) when errors occur. In the following examples, the hardware address strings include diff --git a/usr/src/man/man7p/if_tcp.7p b/usr/src/man/man7p/if_tcp.7p index d59ecc90af..6f811bd12c 100644 --- a/usr/src/man/man7p/if_tcp.7p +++ b/usr/src/man/man7p/if_tcp.7p @@ -8,7 +8,6 @@ .SH NAME if_tcp, if \- general properties of Internet Protocol network interfaces .SH DESCRIPTION -.sp .LP A network interface is a device for sending and receiving packets on a network. It is usually a hardware device, although it can be implemented in software. @@ -16,7 +15,6 @@ Network interfaces used by the Internet Protocol (IPv4 or IPv6) must be STREAMS devices conforming to the Data Link Provider Interface (\fBDLPI\fR). See \fBdlpi\fR(7P). .SH APPLICATION PROGRAMMING INTERFACE -.sp .LP An interface becomes available to \fBIP\fR when it is opened and the \fBIP\fR module is pushed onto the stream with the \fBI_PUSH\fR \fBioctl\fR(2) command. @@ -37,7 +35,6 @@ when an interface's address is set. You cannot create IPMP IP interfaces using the procedure described above. Instead, use \fBifconfig\fR(1M). .SH IOCTLS -.sp .LP The following \fBioctl()\fR calls may be used to manipulate \fBIP\fR network interfaces. Unless specified otherwise, the request takes an \fBlifreq\fR @@ -749,7 +746,6 @@ struct ifconf { .in -2 .SS "IFF_ Flags" -.sp .LP You can use the \fBifconfig\fR(1M) command to display the \fBIFF\fR_ flags listed below (with the leading \fBIFF\fR_ prefix removed). See the @@ -809,7 +805,6 @@ listed below (with the leading \fBIFF\fR_ prefix removed). See the .in -2 .SH ERRORS -.sp .ne 2 .na \fB\fBEPERM\fR\fR @@ -871,7 +866,7 @@ specified by \fBlifr_ppa\fR plumbed. .RE .SH SEE ALSO -.sp .LP -\fBifconfig\fR(1M), \fBin.routed\fR(1M), \fBioctl\fR(2), \fBstreamio\fR(7I), -\fBarp\fR(7P), \fBdlpi\fR(7P), \fBip\fR(7P), \fBip6\fR(7P) +\fBifconfig\fR(1M), \fBin.routed\fR(1M), \fBioctl\fR(2), +\fBsockaddr\fR(3SOCKET), \fBstreamio\fR(7I), \fBarp\fR(7P), \fBdlpi\fR(7P), +\fBip\fR(7P), \fBip6\fR(7P) diff --git a/usr/src/man/man7p/inet.7p b/usr/src/man/man7p/inet.7p index b41d131de8..385fcdfa72 100644 --- a/usr/src/man/man7p/inet.7p +++ b/usr/src/man/man7p/inet.7p @@ -19,7 +19,6 @@ inet \- Internet protocol family .fi .SH DESCRIPTION -.sp .LP The Internet protocol family implements a collection of protocols which are centered around the Internet Protocol ("\fBIP\fR") and which share a common @@ -29,7 +28,6 @@ interface, where they support the \fBSOCK_STREAM\fR, \fBSOCK_DGRAM\fR, and support the connectionless (\fBT_CLTS\fR) and connection oriented (\fBT_COTS_ORD\fR) service types. .SH PROTOCOLS -.sp .LP The Internet protocol family is comprised of the Internet Protocol ("\fBIP\fR"), the Address Resolution Protocol ("\fBARP\fR"), the Internet @@ -83,7 +81,6 @@ Get interface network mask. .RE .SH ADDRESSING -.sp .LP \fBIP\fR addresses are four byte quantities, stored in network byte order. \fBIP\fR addresses should be manipulated using the byte order conversion @@ -155,19 +152,18 @@ restriction by setting the \fBSO_REUSEADDR\fR socket option with numbers. These semantics apply when Internet family protocols are used using the \fBTLI\fR. .SH SEE ALSO -.sp .LP \fBioctl\fR(2), \fBbind\fR(3SOCKET), \fBbyteorder\fR(3SOCKET), \fBconnect\fR(3SOCKET), \fBgethostbyname\fR(3NSL), \fBgetnetbyname\fR(3SOCKET), \fBgetprotobyname\fR(3SOCKET), \fBgetservbyname\fR(3SOCKET), -\fBgetsockopt\fR(3SOCKET), \fBsend\fR(3SOCKET), \fBsocket\fR(3SOCKET), -\fBarp\fR(7P), \fBicmp\fR(7P), \fBip\fR(7P), \fBtcp\fR(7P), \fBudp\fR(7P) +\fBgetsockopt\fR(3SOCKET), \fBsend\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), +\fBsocket\fR(3SOCKET), \fBarp\fR(7P), \fBicmp\fR(7P), \fBip\fR(7P), +\fBtcp\fR(7P), \fBudp\fR(7P) .sp .LP Network Information Center, \fIDDN Protocol Handbook\fR (3 vols.), Network Information Center, \fBSRI\fR International, Menlo Park, Calif., 1985. .SH NOTES -.sp .LP The Internet protocol support is subject to change as the Internet protocols develop. Users should not depend on details of the current implementation, but diff --git a/usr/src/man/man7p/inet6.7p b/usr/src/man/man7p/inet6.7p index cad3e96e7b..e439a7f498 100644 --- a/usr/src/man/man7p/inet6.7p +++ b/usr/src/man/man7p/inet6.7p @@ -14,7 +14,6 @@ inet6 \- Internet protocol family for Internet Protocol version 6 .fi .SH DESCRIPTION -.sp .LP The \fBinet6\fR protocol family implements a collection of protocols that are centered around the Internet Protocol version 6 (\fBIPv6\fR) and share a common @@ -24,7 +23,6 @@ and \fBSOCK_RAW\fR socket types, or the Transport Level Interface (\fBTLI\fR), where it supports the connectionless (\fBT_CLTS\fR) and connection oriented (\fBT_COTS_ORD\fR) service types. .SH PROTOCOLS -.sp .LP The Internet protocol family for \fBIPv6\fR included the Internet Protocol Version 6 (\fBIPv6\fR), the Neighbor Discovery Protocol (\fBNDP\fR), the @@ -162,7 +160,6 @@ The last 64 bits are the interface \fBID\fR. This will most often be the hardware address of the link in \fBIEEE EUI-64\fR format. .RE .SH ADDRESSING -.sp .LP \fBIPv6\fR addresses are sixteen byte quantities, stored in network byte order. The socket \fBAPI\fR uses the \fBsockaddr_in6\fR structure when passing @@ -242,7 +239,6 @@ In addition, the same port may be bound by two separate sockets if one is an numbers. These semantics apply when Internet family protocols are used using the \fBTLI\fR. .SH SOURCE ADDRESS SELECTION -.sp .LP IPv6 source address selection is done on a per destination basis, and utilizes a list of rules from which the best source address is selected from candidate @@ -373,14 +369,13 @@ If SB ^ D < SA ^ D, then prefer SB. Applications can override this algorithm by calling \fBbind\fR(3SOCKET) and specifying an address. .SH SEE ALSO -.sp .LP \fBioctl\fR(2), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET), \fBgetipnodebyaddr\fR(3SOCKET), \fBgetipnodebyname\fR(3SOCKET),\fBgetprotobyname\fR(3SOCKET), \fBgetservbyname\fR(3SOCKET), \fBgetsockopt\fR(3SOCKET), \fBinet\fR(3SOCKET), -\fBsend\fR(3SOCKET), \fBicmp6\fR(7P), \fBip6\fR(7P), \fBtcp\fR(7P), -\fBudp\fR(7P) +\fBsend\fR(3SOCKET), \fBsockaddr\fR(3SOCKET), +\fBicmp6\fR(7P), \fBip6\fR(7P), \fBtcp\fR(7P), \fBudp\fR(7P) .sp .LP Conta, A. and Deering, S., \fIInternet Control Message Protocol (ICMPv6) for @@ -403,7 +398,6 @@ Society. February 2003. Narten, T., and Draves, R. \fIRFC 3041, Privacy Extensions for Stateless Address Autoconfiguration in IPv6.\fR The Internet Society. January 2001. .SH NOTES -.sp .LP The \fBIPv6\fR support is subject to change as the Internet protocols develop. Users should not depend on details of the current implementation, but rather diff --git a/usr/src/man/man7p/pf_key.7p b/usr/src/man/man7p/pf_key.7p index 21e494ec3d..2e092973d2 100644 --- a/usr/src/man/man7p/pf_key.7p +++ b/usr/src/man/man7p/pf_key.7p @@ -19,7 +19,6 @@ pf_key \- Security association database interface .fi .SH DESCRIPTION -.sp .LP Keying information for IPsec security services is maintained in security association databases (\fBSADB\fRs). The security associations (\fBSA\fRs) are @@ -52,7 +51,6 @@ message and all extensions must be eight-byte aligned. An example message is the \fBGET\fR message, which requires the base header, the \fBSA \fRextension, and the \fBADDRESS_DST\fR extension. .SS "Messages" -.sp .LP Messages include: .sp @@ -162,7 +160,6 @@ Security Association Information Extension flags: .LP Extension headers include: .SS "Generic Extension Header" -.sp .in +2 .nf struct sadb_ext { @@ -173,7 +170,6 @@ struct sadb_ext { .in -2 .SS "Security Association Information Extension" -.sp .in +2 .nf struct sadb_sa { @@ -190,7 +186,6 @@ struct sadb_sa { .in -2 .SS "Lifetime Extension" -.sp .in +2 .nf struct sadb_lifetime { @@ -205,7 +200,6 @@ struct sadb_lifetime { .in -2 .SS "Address Extension" -.sp .in +2 .nf struct sadb_address { @@ -221,7 +215,6 @@ struct sadb_address { .in -2 .SS "Keying Material Extension" -.sp .in +2 .nf struct sadb_key { @@ -236,7 +229,6 @@ struct sadb_key { .in -2 .SS "Indentity Extension" -.sp .in +2 .nf struct sadb_ident { @@ -251,7 +243,6 @@ struct sadb_ident { .in -2 .SS "Sensitivity/Integrity Extension" -.sp .in +2 .nf struct sadb_sens { @@ -273,7 +264,6 @@ struct sadb_sens { .in -2 .SS "Proposal Extension" -.sp .in +2 .nf struct sadb_prop { @@ -288,7 +278,6 @@ struct sadb_prop { .in -2 .SS "Combination Instance for a Proposal" -.sp .in +2 .nf struct sadb_comb { @@ -313,7 +302,6 @@ struct sadb_comb { .in -2 .SS "Extended Combination" -.sp .in +2 .nf struct sadb_x_ecomb { @@ -334,7 +322,6 @@ struct sadb_x_ecomb { .in -2 .SS "Extended Combination Algorithm Descriptors" -.sp .in +2 .nf struct sadb_x_algdesc { @@ -349,7 +336,6 @@ struct sadb_x_algdesc { .in -2 .SS "Extended Register" -.sp .in +2 .nf struct sadb_x_ereg { @@ -361,7 +347,6 @@ struct sadb_x_ereg { .in -2 .SS "Key Management Cookie" -.sp .in +2 .nf struct sadb_x_kmc { @@ -375,7 +360,6 @@ struct sadb_x_kmc { .in -2 .SS "Supported Algorithms Extension" -.sp .in +2 .nf struct sadb_supported { @@ -387,7 +371,6 @@ struct sadb_supported { .in -2 .SS "Algorithm Instance" -.sp .in +2 .nf struct sadb_alg { @@ -401,7 +384,6 @@ struct sadb_alg { .in -2 .SS "SPI Extension Range" -.sp .in +2 .nf struct sadb_spirange { @@ -415,7 +397,6 @@ struct sadb_spirange { .in -2 .SS "Security Association Pair Extension" -.sp .in +2 .nf struct sadb_x_pair { @@ -427,7 +408,6 @@ struct sadb_x_pair { .in -2 .SS "Message Use and Behavior" -.sp .LP Each message has a behavior. A behavior is defined as where the initial message travels, for example, user to kernel, and what subsequent actions are expected @@ -529,7 +509,6 @@ Message exceeds the maximum length allowed. .LP The following are examples of message use and behavior: .SS "\fBSADB_GETSPI\fR" -.sp .LP Send a \fBSADB_GETSPI\fR message from a user process to the kernel. .sp @@ -550,7 +529,6 @@ The kernel returns the \fBSADB_GETSPI\fR message to all listening processes. .in -2 .SS "\fBSADB_UPDATE\fR" -.sp .LP Send a \fBSADB_UPDATE\fR message from a user process to the kernel. .sp @@ -579,7 +557,6 @@ security association contained in that extension. The resulting security association "pair" can be updated or as a single entity using the \fBSADB_X_UPDATEPAIR\fR or \fBSADB_X_DELPAIR\fR message types. .SS "\fBSADB_ADD\fR" -.sp .LP Send a \fBSADB_ADD\fR message from a user process to the kernel. .sp @@ -602,7 +579,6 @@ The kernel returns the \fBSADB_ADD\fR message to all listening processes. .in -2 .SS "\fBSADB_X_UPDATEPAIR\fR" -.sp .LP Send a \fBSADB_X_UPDATEPAIR\fR message from a user process to the kernel. This message type is used to update the lifetime values of a security @@ -616,7 +592,6 @@ with. .in -2 .SS "\fBSADB_DELETE | SADB_X_DELPAIR\fR" -.sp .LP Send a \fBSADB_DELETE\fR message from a user process to the kernel. The \fBSADB_X_DELPAIR\fR message type will request deletion of the security @@ -639,7 +614,6 @@ The kernel returns the \fBSADB_DELETE\fR message to all listening processes. .in -2 .SS "\fBSADB_GET\fR" -.sp .LP Send a \fBSADB_GET\fR message from a user process to the kernel. .sp @@ -662,7 +636,6 @@ The kernel returns the \fBSADB_GET\fR message to the socket that sent the .in -2 .SS "\fBSADB_ACQUIRE\fR" -.sp .LP The kernel sends a \fBSADB_ACQUIRE\fR message to registered sockets. Note that any \fBGETSPI\fR, \fBADD\fR, or \fBUPDATE\fR calls in reaction to an @@ -702,7 +675,6 @@ If key management fails, send an \fBSADB_ACQUIRE\fR to indicate failure. .in -2 .SS "\fBSADB_X_INVERSE_ACQUIRE\fR" -.sp .LP For inbound Key Management processing, a Key Management application may wish to consult the kernel for its policy. The application should send to the kernel: @@ -725,7 +697,6 @@ The kernel returns a message similar to a kernel-generated extended ACQUIRE: .in -2 .SS "\fBSADB_REGISTER\fR" -.sp .LP Send a \fBSADB_REGISTER\fR message from a user process to the kernel. .sp @@ -764,7 +735,6 @@ extended ACQUIREs. Which returns a series of SADB_REGISTER replies (one for each security protocol registered) from the kernel. .SS "\fBSADB_EXPIRE\fR" -.sp .LP The kernel sends a \fBSADB_EXPIRE\fR message to all listeners when the soft limit of a security association has been expired. @@ -776,7 +746,6 @@ limit of a security association has been expired. .in -2 .SS "\fBSADB_FLUSH\fR" -.sp .LP Send a \fBSADB_FLUSH\fR message from a user process to the kernel. .sp @@ -797,7 +766,6 @@ The kernel returns the \fBSADB_FLUSH\fR message to all listening sockets. .in -2 .SS "\fBSADB_DUMP\fR" -.sp .LP Send a \fBSADB_DUMP\fR message from a user process to the kernel. .sp @@ -831,7 +799,6 @@ To mark the end of a dump a single base header arrives with its .in -2 .SS "\fBSADB_X_PROMISC\fR" -.sp .LP Send a \fBSADB_X_PROMISC\fR message from a user process to the kernel. .sp @@ -852,7 +819,6 @@ The kernel returns the \fBSADB_X_PROMISC\fR message to all listening processes. .in -2 .SH DIAGNOSTICS -.sp .LP The message returning from the kernel will contain a diagnostic value in the base message header, the diagnostic value will indicate if action requested by @@ -970,7 +936,6 @@ Diagnostic Values: .in -2 .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -985,16 +950,15 @@ Interface Stability Evolving .TE .SH SEE ALSO -.sp .LP -\fBin.iked\fR(1M), \fBipseckey\fR(1M), \fBipsec\fR(7P), \fBipsecah\fR(7P), +\fBin.iked\fR(1M), \fBipseckey\fR(1M), \fBsockaddr\fR(3SOCKET), +\fBipsec\fR(7P), \fBipsecah\fR(7P), \fBipsecesp\fR(7P), \fBroute\fR(7P), \fBudp\fR(7P) .sp .LP McDonald, D.L., Metz, C.W., and Phan, B.G., \fIRFC 2367, PF_KEY Key Management API, Version 2\fR, The Internet Society, July 1998. .SH NOTES -.sp .LP Time-based lifetimes may not expire with exact precision in seconds because kernel load may affect the aging of \fBSA\fR's. diff --git a/usr/src/man/man7p/route.7p b/usr/src/man/man7p/route.7p index 0209e580ad..ba193fef11 100644 --- a/usr/src/man/man7p/route.7p +++ b/usr/src/man/man7p/route.7p @@ -22,7 +22,6 @@ route \- kernel packet forwarding database .fi .SH DESCRIPTION -.sp .LP UNIX provides some packet routing facilities. The kernel maintains a routing information database, which is used in selecting the appropriate network @@ -208,7 +207,6 @@ that configure interfaces and wish to wait until the interface is ready can wait until \fBRTM_IFINFO\fR is returned and \fBSIOCGLIFFLAGS\fR shows that \fBIFF_DUPLICATE\fR is not set. .SS "Messages" -.sp .LP User processes can obtain information about the routing entry to a specific destination by using a \fBRTM_GET\fR message. @@ -323,12 +321,10 @@ struct rt_metrics { .in -2 .SH SEE ALSO -.sp .LP \fBioctl\fR(2), \fBsetsockopt\fR(3SOCKET), \fBshutdown\fR(3SOCKET), -\fBrouting\fR(7P) +\fBsockaddr\fR(3SOCKET), \fBrouting\fR(7P) .SH NOTES -.sp .LP Some of the metrics might not be implemented and return zero. The implemented metrics are set in \fBrtm_inits\fR. diff --git a/usr/src/pkg/manifests/system-library.man3socket.inc b/usr/src/pkg/manifests/system-library.man3socket.inc index 44a8d7793e..b3f8ca66d9 100644 --- a/usr/src/pkg/manifests/system-library.man3socket.inc +++ b/usr/src/pkg/manifests/system-library.man3socket.inc @@ -49,6 +49,7 @@ 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 @@ -181,3 +182,11 @@ 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 +link path=usr/share/man/man3socket/sockaddr_in.3socket target=sockaddr.3socket +link path=usr/share/man/man3socket/sockaddr_in6.3socket \ + target=sockaddr.3socket +link path=usr/share/man/man3socket/sockaddr_ll.3socket target=sockaddr.3socket +link path=usr/share/man/man3socket/sockaddr_storage.3socket \ + target=sockaddr.3socket +link path=usr/share/man/man3socket/sockaddr_un.3socket target=sockaddr.3socket -- 2.11.4.GIT