summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Pankov <yuri.pankov@nexenta.com>2018-08-03 21:34:10 +0300
committerRichard Lowe <richlowe@richlowe.net>2018-08-06 19:38:36 +0000
commitcc581a18c90036f3cc09e518f22af9b2f11b2a8d (patch)
tree45cb4d3dbb1afc1f1f182daef02bffebd624ea13
parent8cd3131235b232e4d63be3cf95ce9be87907e74f (diff)
downloadillumos-joyent-cc581a18c90036f3cc09e518f22af9b2f11b2a8d.tar.gz
9701 byteorder functions are in libc for a long time
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Peter Tribble <peter.tribble@gmail.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/man/man3c/Makefile14
-rw-r--r--usr/src/man/man3c/byteorder.3c86
-rw-r--r--usr/src/man/man3c/endian.3c6
-rw-r--r--usr/src/man/man3head/endian.h.3head5
-rw-r--r--usr/src/man/man3head/inet.h.3head2
-rw-r--r--usr/src/man/man3lib/libsocket.3lib15
-rw-r--r--usr/src/man/man3nsl/gethostbyname.3nsl13
-rw-r--r--usr/src/man/man3socket/Makefile14
-rw-r--r--usr/src/man/man3socket/byteorder.3socket77
-rw-r--r--usr/src/man/man3socket/getaddrinfo.3socket2
-rw-r--r--usr/src/man/man3socket/getipnodebyname.3socket2
-rw-r--r--usr/src/man/man3socket/getservbyname.3socket15
-rw-r--r--usr/src/man/man3socket/rexec.3socket8
-rw-r--r--usr/src/man/man3socket/sockaddr.3socket12
-rw-r--r--usr/src/man/man5/byteorder.524
-rw-r--r--usr/src/man/man7p/inet.7p4
-rw-r--r--usr/src/pkg/manifests/system-library.man3c.inc7
-rw-r--r--usr/src/pkg/manifests/system-library.man3socket.inc7
18 files changed, 147 insertions, 166 deletions
diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile
index dcdaad1271..2864756ce9 100644
--- a/usr/src/man/man3c/Makefile
+++ b/usr/src/man/man3c/Makefile
@@ -59,6 +59,7 @@ MANFILES= __fbufsize.3c \
bsearch.3c \
bstring.3c \
btowc.3c \
+ byteorder.3c \
call_once.3c \
catgets.3c \
catopen.3c \
@@ -885,6 +886,9 @@ MANLINKS= FD_CLR.3c \
htole16.3c \
htole32.3c \
htole64.3c \
+ htonl.3c \
+ htonll.3c \
+ htons.3c \
inet6.3c \
inet_addr.3c \
inet_aton.3c \
@@ -1032,6 +1036,9 @@ MANLINKS= FD_CLR.3c \
ngettext.3c \
nl_langinfo_l.3c \
nrand48.3c \
+ ntohl.3c \
+ ntohll.3c \
+ ntohs.3c \
openlog.3c \
pclose.3c \
port_dissociate.3c \
@@ -1563,6 +1570,13 @@ explicit_bzero.3c := LINKSRC = bstring.3c
btowc_l.3c := LINKSRC = btowc.3c
+htonl.3c := LINKSRC = byteorder.3c
+htonll.3c := LINKSRC = byteorder.3c
+htons.3c := LINKSRC = byteorder.3c
+ntohl.3c := LINKSRC = byteorder.3c
+ntohll.3c := LINKSRC = byteorder.3c
+ntohs.3c := LINKSRC = byteorder.3c
+
canonicalize_file_name.3c := LINKSRC = realpath.3c
catclose.3c := LINKSRC = catopen.3c
diff --git a/usr/src/man/man3c/byteorder.3c b/usr/src/man/man3c/byteorder.3c
new file mode 100644
index 0000000000..16de6b983e
--- /dev/null
+++ b/usr/src/man/man3c/byteorder.3c
@@ -0,0 +1,86 @@
+.\"
+.\" 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]
+.\"
+.\"
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 2018 Nexenta Systems, Inc.
+.\"
+.Dd August 2, 2018
+.Dt BYTEORDER 3C
+.Os
+.Sh NAME
+.Nm byteorder ,
+.Nm htonl ,
+.Nm htonll ,
+.Nm htons ,
+.Nm ntohl ,
+.Nm ntohll ,
+.Nm ntohs
+.Nd convert values between host and network byte order
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In sys/types.h
+.In netinet/in.h
+.In inttypes.h
+.Ft uint32_t
+.Fo htonl
+.Fa "uint32_t hostlong"
+.Fc
+.Ft uint64_t
+.Fo htonll
+.Fa "uint64_t hostlonglong"
+.Fc
+.Ft uint16_t
+.Fo htons
+.Fa "uint16_t hostshort"
+.Fc
+.Ft uint32_t
+.Fo ntohl
+.Fa "uint32_t netlong"
+.Fc
+.Ft uint64_t
+.Fo ntohll
+.Fa "uint64_t netlonglong"
+.Fc
+.Ft uint16_t
+.Fo ntohs
+.Fa "uint16_t netshort"
+.Fc
+.Sh DESCRIPTION
+These functions convert 16-bit, 32-bit, and 64-bit quantities between network
+byte order and host byte order.
+On some architectures these routines are defined as
+.Dv NULL
+macros in the include file
+.In netinet/in.h .
+On other architectures, the routines are functional when the host byte order is
+different from network byte order.
+.Pp
+These functions are most often used in conjunction with Internet addresses and
+ports as returned by
+.Xr gethostent 3NSL
+and
+.Xr getservent 3NSL .
+.Sh MT-LEVEL
+.Sy Safe
+.Sh SEE ALSO
+.Xr inet.h 3HEAD ,
+.Xr gethostent 3NSL ,
+.Xr getservent 3NSL ,
+.Xr attributes 5 ,
+.Xr byteorder 5
diff --git a/usr/src/man/man3c/endian.3c b/usr/src/man/man3c/endian.3c
index 658d47ba58..65c07323bb 100644
--- a/usr/src/man/man3c/endian.3c
+++ b/usr/src/man/man3c/endian.3c
@@ -11,7 +11,7 @@
.\"
.\" Copyright 2016 Joyent, Inc.
.\"
-.Dd January 30, 2016
+.Dd August 2, 2018
.Dt ENDIAN 3C
.Os
.Sh NAME
@@ -177,7 +177,7 @@ To better support extant software, both are provided.
While these functions are common across multiple platforms, they have
not been standardized.
Portable applications should instead use the functions defined in
-.Xr byteorder 3SOCKET .
+.Xr byteorder 3C .
.Sh RETURN VALUES
The functions always succeed and return a value that has been properly
converted.
@@ -186,7 +186,7 @@ converted.
.Sh MT-LEVEL
.Sy MT-Safe
.Sh SEE ALSO
+.Xr byteorder 3C ,
.Xr endian.h 3HEAD ,
-.Xr byteorder 3SOCKET ,
.Xr attributes 5 ,
.Xr byteorder 5
diff --git a/usr/src/man/man3head/endian.h.3head b/usr/src/man/man3head/endian.h.3head
index 1e133e6fb6..82a195c9bd 100644
--- a/usr/src/man/man3head/endian.h.3head
+++ b/usr/src/man/man3head/endian.h.3head
@@ -11,7 +11,7 @@
.\"
.\" Copyright 2016 Joyent, Inc.
.\"
-.Dd January 30, 2016
+.Dd August 2, 2018
.Dt ENDIAN.H 3HEAD
.Os
.Sh NAME
@@ -77,7 +77,7 @@ to one of the aforementioned macros.
.Pp
In addition to the routines provided by this header, standardized
functions may be found in
-.Xr byteorder 3SOCKET .
+.Xr byteorder 3C .
The header
.Xr types.h 3HEAD
also defines additional pre-processor symbols to determine the current
@@ -85,6 +85,7 @@ endianness of the system.
.Sh INTERFACE STABILITY
.Sy Committed
.Sh SEE ALSO
+.Xr byteorder 3C ,
.Xr endian 3C ,
.Xr types.h 3HEAD ,
.Xr attributes 5 ,
diff --git a/usr/src/man/man3head/inet.h.3head b/usr/src/man/man3head/inet.h.3head
index b0f2e257bd..8e48664781 100644
--- a/usr/src/man/man3head/inet.h.3head
+++ b/usr/src/man/man3head/inet.h.3head
@@ -125,6 +125,6 @@ Interface Stability Standard
.SH SEE ALSO
.LP
-\fBIntro\fR(3), \fBhtonl\fR(3C), \fBhtonl\fR(3XNET),
+\fBIntro\fR(3), \fBhtonl\fR(3C),
\fBinet_addr\fR(3C), \fBinet_addr\fR(3XNET), \fBin.h\fR(3HEAD),
\fBattributes\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man3lib/libsocket.3lib b/usr/src/man/man3lib/libsocket.3lib
index 58666187e1..7d22c95840 100644
--- a/usr/src/man/man3lib/libsocket.3lib
+++ b/usr/src/man/man3lib/libsocket.3lib
@@ -3,7 +3,7 @@
.\" 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 LIBSOCKET 3LIB "Nov 2, 2004"
+.TH LIBSOCKET 3LIB "Aug 2, 2018"
.SH NAME
libsocket \- sockets library
.SH SYNOPSIS
@@ -13,12 +13,10 @@ cc [ \fIflag\fR... ] \fIfile\fR... \fB-lsocket\fR [ \fIlibrary\fR... ]
.fi
.SH DESCRIPTION
-.sp
.LP
Functions in this library provide the socket internetworking interface,
primarily used with the TCP/IP protocol suite.
.SH INTERFACES
-.sp
.LP
The shared object \fBlibsocket.so.1\fR provides the public interfaces defined
below. See \fBIntro\fR(3) for additional information on shared object
@@ -51,14 +49,12 @@ l l .
\fBgetservbyname_r\fR \fBgetservbyport\fR
\fBgetservbyport_r\fR \fBgetservent\fR
\fBgetservent_r\fR \fBgetsockname\fR
-\fBgetsockopt\fR \fBhtonl\fR
-\fBhtons\fR \fBif_freenameindex\fR
+\fBgetsockopt\fR \fBif_freenameindex\fR
\fBif_indextoname\fR \fBif_nameindex\fR
\fBif_nametoindex\fR \fBin6addr_any\fR
\fBin6addr_loopback\fR \fBinet_lnaof\fR
\fBinet_makeaddr\fR \fBinet_network\fR
-\fBlisten\fR \fBntohl\fR
-\fBntohs\fR \fBrcmd\fR
+\fBlisten\fR \fBrcmd\fR
\fBrcmd_af\fR \fBrecv\fR
\fBrecvfrom\fR \fBrecvmsg\fR
\fBrexec\fR \fBrexec_af\fR
@@ -68,11 +64,10 @@ l l .
\fBsetnetent\fR \fBsetprotoent\fR
\fBsetservent\fR \fBsetsockopt\fR
\fBshutdown\fR \fBsocket\fR
-\fBsocketpair\fR
+\fBsocketpair\fR
.TE
.SH FILES
-.sp
.ne 2
.na
\fB\fB/lib/libsocket.so.1\fR\fR
@@ -91,7 +86,6 @@ shared object
.RE
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -107,7 +101,6 @@ MT-Level See the manual page for each interface.
.TE
.SH SEE ALSO
-.sp
.LP
\fBpvs\fR(1), \fBIntro\fR(2), \fBIntro\fR(3), \fBsocket.h\fR(3HEAD),
\fBattributes\fR(5)
diff --git a/usr/src/man/man3nsl/gethostbyname.3nsl b/usr/src/man/man3nsl/gethostbyname.3nsl
index 4b0e9ed867..925f3ebb85 100644
--- a/usr/src/man/man3nsl/gethostbyname.3nsl
+++ b/usr/src/man/man3nsl/gethostbyname.3nsl
@@ -99,7 +99,6 @@ gethostent_r, sethostent, endhostent \- get network host entry
.fi
.SH DESCRIPTION
-.sp
.LP
These functions are used to obtain entries describing hosts. An entry can come
from any of the sources for \fBhosts\fR specified in the
@@ -126,7 +125,7 @@ by \fIaddr\fR.
.sp
.LP
All addresses are returned in network order. In order to interpret the
-addresses, \fBbyteorder\fR(3SOCKET) must be used for byte order conversion.
+addresses, \fBbyteorder\fR(3C) must be used for byte order conversion.
.sp
.LP
The \fBsethostent()\fR, \fBgethostent()\fR, and \fBendhostent()\fR functions
@@ -151,7 +150,6 @@ deallocate resources it was using. It is still allowed, but possibly less
efficient, for the process to call more host retrieval functions after calling
\fBendhostent()\fR.
.SS "Reentrant Interfaces"
-.sp
.LP
The \fBgethostbyname()\fR, \fBgethostbyaddr()\fR, and \fBgethostent()\fR
functions use static storage that is reused in each call, making these
@@ -196,7 +194,6 @@ Like their non-reentrant counterparts, \fBgethostbyname_r()\fR and
\fBgethostbyaddr_r()\fR leave the enumeration position in an indeterminate
state.
.SH RETURN VALUES
-.sp
.LP
Host entries are represented by the \fBstruct hostent\fR structure defined in
\fB<netdb.h>\fR:
@@ -244,7 +241,6 @@ always equal to the \fIresult\fR pointer that was supplied by the caller.
The \fBsethostent()\fR and \fBendhostent()\fR functions return \fB0\fR on
success.
.SH ERRORS
-.sp
.LP
The reentrant functions \fBgethostbyname_r()\fR, \fBgethostbyaddr_r()\fR, and
\fBgethostent_r()\fR will return \fINULL\fR and set \fIerrno\fR to \fBERANGE\fR
@@ -329,7 +325,6 @@ Note that the preceding sample program is unsafe for use in multithreaded
applications.
.SH FILES
-.sp
.ne 2
.na
\fB\fB/etc/hosts\fR\fR
@@ -358,7 +353,6 @@ configuration file for the name service switch
.RE
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -376,19 +370,16 @@ T}
.TE
.SH SEE ALSO
-.sp
.LP
-\fBIntro\fR(2), \fBIntro\fR(3), \fBbyteorder\fR(3SOCKET), \fBinet\fR(3SOCKET),
+\fBIntro\fR(2), \fBIntro\fR(3), \fBbyteorder\fR(3C), \fBinet\fR(3SOCKET),
\fBnetdb.h\fR(3HEAD), \fBnetdir\fR(3NSL), \fBhosts\fR(4), \fBnetconfig\fR(4),
\fBnss\fR(4), \fBnsswitch.conf\fR(4), \fBattributes\fR(5)
.SH WARNINGS
-.sp
.LP
The reentrant interfaces \fBgethostbyname_r()\fR, \fBgethostbyaddr_r()\fR, and
\fBgethostent_r()\fR are included in this release on an uncommitted basis only
and are subject to change or removal in future minor releases.
.SH NOTES
-.sp
.LP
To ensure that they all return consistent results, \fBgethostbyname()\fR,
\fBgethostbyname_r()\fR, and \fBnetdir_getbyname()\fR are implemented in terms
diff --git a/usr/src/man/man3socket/Makefile b/usr/src/man/man3socket/Makefile
index 3422782a2a..d700951ae1 100644
--- a/usr/src/man/man3socket/Makefile
+++ b/usr/src/man/man3socket/Makefile
@@ -21,7 +21,6 @@ MANSECT= 3socket
MANFILES= accept.3socket \
bind.3socket \
- byteorder.3socket \
connect.3socket \
ethers.3socket \
getaddrinfo.3socket \
@@ -90,9 +89,6 @@ MANLINKS= accept4.3socket \
getservbyport_r.3socket \
getservent.3socket \
getservent_r.3socket \
- htonl.3socket \
- htonll.3socket \
- htons.3socket \
if_freenameindex.3socket \
if_indextoname.3socket \
if_nameindex.3socket \
@@ -109,9 +105,6 @@ MANLINKS= accept4.3socket \
inet6_rth_reverse.3socket \
inet6_rth_segments.3socket \
inet6_rth_space.3socket \
- ntohl.3socket \
- ntohll.3socket \
- ntohs.3socket \
rcmd_af.3socket \
recvfrom.3socket \
recvmsg.3socket \
@@ -138,13 +131,6 @@ MANLINKS= accept4.3socket \
accept4.3socket := LINKSRC = accept.3socket
-htonl.3socket := LINKSRC = byteorder.3socket
-htonll.3socket := LINKSRC = byteorder.3socket
-htons.3socket := LINKSRC = byteorder.3socket
-ntohl.3socket := LINKSRC = byteorder.3socket
-ntohll.3socket := LINKSRC = byteorder.3socket
-ntohs.3socket := LINKSRC = byteorder.3socket
-
ether_aton.3socket := LINKSRC = ethers.3socket
ether_aton_r.3socket := LINKSRC = ethers.3socket
ether_hostton.3socket := LINKSRC = ethers.3socket
diff --git a/usr/src/man/man3socket/byteorder.3socket b/usr/src/man/man3socket/byteorder.3socket
deleted file mode 100644
index 1d08cd8204..0000000000
--- a/usr/src/man/man3socket/byteorder.3socket
+++ /dev/null
@@ -1,77 +0,0 @@
-'\" te
-.\" Copyright (c) 2008, 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 BYTEORDER 3SOCKET "Mar 10, 2016"
-.SH NAME
-byteorder, htonl, htonll, htons, ntohl, ntohll, ntohs \- convert values between
-host and network byte order
-.SH SYNOPSIS
-.LP
-.nf
-\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsocket\fR \fB -lnsl \fR [ \fIlibrary\fR... ]
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <inttypes.h>
-
-\fBuint32_t\fR \fBhtonl\fR(\fBuint32_t\fR \fIhostlong\fR);
-.fi
-
-.LP
-.nf
-\fBuint64_t\fR \fBhtonll\fR(\fBuint64_t\fR \fIhostlonglong\fR);
-.fi
-
-.LP
-.nf
-\fBuint16_t\fR \fBhtons\fR(\fBuint16_t\fR \fIhostshort\fR);
-.fi
-
-.LP
-.nf
-\fBuint32_t\fR \fBntohl\fR(\fBuint32_t\fR \fInetlong\fR);
-.fi
-
-.LP
-.nf
-\fBuint64_t\fR \fBntohll\fR(\fBuint64_t\fR \fIhostlonglong\fR);
-.fi
-
-.LP
-.nf
-\fBuint16_t\fR \fBntohs\fR(\fBuint16_t\fR \fInetshort\fR);
-.fi
-
-.SH DESCRIPTION
-.LP
-These functions convert 16-bit, 32-bit, and 64-bit quantities between network
-byte order and host byte order. On some architectures these routines are
-defined as \fINULL\fR macros in the include file <\fBnetinet/in.h\fR>. On other
-architectures, the routines are functional when the host byte order is
-different from network byte order.
-.sp
-.LP
-These functions are most often used in conjunction with Internet addresses and
-ports as returned by \fBgethostent()\fR and \fBgetservent()\fR. See
-\fBgethostbyname\fR(3NSL) and \fBgetservbyname\fR(3SOCKET).
-.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
-\fBgethostbyname\fR(3NSL), \fBgetservbyname\fR(3SOCKET), \fBinet.h\fR(3HEAD),
-\fBattributes\fR(5), \fBbyteorder\fR(5)
diff --git a/usr/src/man/man3socket/getaddrinfo.3socket b/usr/src/man/man3socket/getaddrinfo.3socket
index 8d43f9641b..6e24126b66 100644
--- a/usr/src/man/man3socket/getaddrinfo.3socket
+++ b/usr/src/man/man3socket/getaddrinfo.3socket
@@ -532,7 +532,7 @@ Standard See \fBstandards\fR(5).
.SH SEE ALSO
.LP
\fBipaddrsel\fR(1M), \fBgethostbyname\fR(3NSL), \fBgetipnodebyname\fR(3SOCKET),
-\fBhtonl\fR(3SOCKET), \fBinet\fR(3SOCKET), \fBsockaddr\fR(3SOCKET),
+\fBhtonl\fR(3C), \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
diff --git a/usr/src/man/man3socket/getipnodebyname.3socket b/usr/src/man/man3socket/getipnodebyname.3socket
index 7eca1e3892..89e6100e03 100644
--- a/usr/src/man/man3socket/getipnodebyname.3socket
+++ b/usr/src/man/man3socket/getipnodebyname.3socket
@@ -504,7 +504,7 @@ MT-Level Safe
.SH SEE ALSO
.LP
-\fBgetaddrinfo\fR(3SOCKET), \fBgethostbyname\fR(3NSL), \fBhtonl\fR(3SOCKET),
+\fBgetaddrinfo\fR(3SOCKET), \fBgethostbyname\fR(3NSL), \fBhtonl\fR(3C),
\fBinet\fR(3SOCKET), \fBnetdb.h\fR(3HEAD), \fBhosts\fR(4),
\fBnsswitch.conf\fR(4), \fBattributes\fR(5)
.SH NOTES
diff --git a/usr/src/man/man3socket/getservbyname.3socket b/usr/src/man/man3socket/getservbyname.3socket
index cc251a2252..b9b2f1a98b 100644
--- a/usr/src/man/man3socket/getservbyname.3socket
+++ b/usr/src/man/man3socket/getservbyname.3socket
@@ -53,7 +53,6 @@ getservent_r, setservent, endservent \- get service entry
.fi
.SH DESCRIPTION
-.sp
.LP
These functions are used to obtain entries for Internet services. An entry may
come from any of the sources for \fBservices\fR specified in the
@@ -75,7 +74,7 @@ number \fIport\fR.
.sp
.LP
All addresses are returned in network order. In order to interpret the
-addresses, \fBbyteorder\fR(3SOCKET) must be used for byte order conversion. The
+addresses, \fBbyteorder\fR(3C) must be used for byte order conversion. The
string \fIproto\fR is used by both \fBgetservbyname()\fR and
\fBgetservbyport()\fR to restrict the search to entries with the specified
protocol. If \fIproto\fR is \fINULL\fR, entries with any protocol can be
@@ -113,7 +112,6 @@ was using. It is still allowed, but possibly less efficient, for the process
to call more service entry retrieval functions after calling
\fBendservent()\fR.
.SS "Reentrant Interfaces"
-.sp
.LP
The functions \fBgetservbyname()\fR, \fBgetservbyport()\fR, and
\fBgetservent()\fR use static storage that is re-used in each call, making
@@ -156,7 +154,6 @@ Like their non-reentrant counterparts, \fBgetservbyname_r()\fR and
\fBgetservbyport_r()\fR leave the enumeration position in an indeterminate
state.
.SH RETURN VALUES
-.sp
.LP
Service entries are represented by the \fBstruct servent\fR structure defined
in <\fBnetdb.h\fR>:
@@ -234,7 +231,6 @@ When the pointer returned by the reentrant functions \fBgetservbyname_r()\fR,
\fBgetservbyport_r()\fR, and \fBgetservent_r()\fR is non-null, it is always
equal to the \fIresult\fR pointer that was supplied by the caller.
.SH ERRORS
-.sp
.LP
The reentrant functions \fBgetservbyname_r()\fR, \fBgetservbyport_r()\fR, and
\fBgetservent_r()\fR return \fINULL\fR and set \fBerrno\fR to \fBERANGE\fR if
@@ -242,7 +238,6 @@ the length of the buffer supplied by caller is not large enough to store the
result. See \fBIntro\fR(2) for the proper usage and interpretation of
\fBerrno\fR in multithreaded applications.
.SH FILES
-.sp
.ne 2
.na
\fB\fB/etc/services\fR\fR
@@ -270,7 +265,6 @@ configuration file for the name-service switch
.RE
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -288,24 +282,21 @@ T}
.TE
.SH SEE ALSO
-.sp
.LP
-\fBIntro\fR(2), \fBIntro\fR(3), \fBbyteorder\fR(3SOCKET), \fBnetdir\fR(3NSL),
+\fBIntro\fR(2), \fBIntro\fR(3), \fBbyteorder\fR(3C), \fBnetdir\fR(3NSL),
\fBnetconfig\fR(4), \fBnsswitch.conf\fR(4), \fBservices\fR(4),
\fBattributes\fR(5), \fBnetdb.h\fR(3HEAD)
.SH WARNINGS
-.sp
.LP
The reentrant interfaces \fBgetservbyname_r()\fR, \fBgetservbyport_r()\fR, and
\fBgetservent_r()\fR are included in this release on an uncommitted basis only,
and are subject to change or removal in future minor releases.
.SH NOTES
-.sp
.LP
The functions that return \fBstruct servent\fR return the least significant
16-bits of the \fIs_port\fR field in \fInetwork byte order\fR.
\fBgetservbyport()\fR and \fBgetservbyport_r()\fR also expect the input
-parameter \fIport\fR in the \fInetwork byte order\fR. See \fBhtons\fR(3SOCKET)
+parameter \fIport\fR in the \fInetwork byte order\fR. See \fBhtons\fR(3C)
for more details on converting between host and network byte orders.
.sp
.LP
diff --git a/usr/src/man/man3socket/rexec.3socket b/usr/src/man/man3socket/rexec.3socket
index 34163c2d80..99461eb178 100644
--- a/usr/src/man/man3socket/rexec.3socket
+++ b/usr/src/man/man3socket/rexec.3socket
@@ -25,7 +25,6 @@ rexec, rexec_af \- return stream to a remote command
.fi
.SH DESCRIPTION
-.sp
.LP
The \fBrexec()\fR and \fBrexec_af()\fR functions look up the host \fIahost\fR
using \fBgetaddrinfo\fR(3SOCKET) and return \fB\(mi1\fR if the host does not
@@ -47,7 +46,7 @@ connectivity to the remote host.
.LP
The port \fIinport\fR specifies which \fBDARPA\fR Internet port to use for the
connection. The port number used must be in network byte order, as supplied by
-a call to \fBhtons\fR(3XNET). The protocol for connection is described in
+a call to \fBhtons\fR(3C). The protocol for connection is described in
detail in \fBin.rexecd\fR(1M).
.sp
.LP
@@ -67,7 +66,6 @@ out-of-band data.
There is no way to specify options to the \fBsocket()\fR call made by the
\fBrexec()\fR or \fBrexec_af()\fRfunctions.
.SH RETURN VALUES
-.sp
.LP
If \fBrexec()\fR succeeds, a file descriptor number is returned of the socket
type \fBSOCK_STREAM\fR and the address family \fBAF_INET\fR. The parameter
@@ -83,7 +81,6 @@ the socket type \fBSOCK_STREAM\fR in the address family \fBAF_INET\fR or
.LP
If either \fBrexec()\fR or \fBrexec_af()\fR fails, \fB\(mi1\fR is returned.
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -103,8 +100,7 @@ MT-Level Unsafe
This interface is Unsafe in multithreaded applications. Unsafe interfaces
should be called only from the main thread.
.SH SEE ALSO
-.sp
.LP
\fBin.rexecd\fR(1M), \fBgetaddrinfo\fR(3SOCKET), \fBgethostbyname\fR(3NSL),
-\fBgetservbyname\fR(3SOCKET), \fBhtonl\fR(3XNET), \fBsocket\fR(3SOCKET),
+\fBgetservbyname\fR(3SOCKET), \fBhtonl\fR(3C), \fBsocket\fR(3SOCKET),
\fBattributes\fR(5)
diff --git a/usr/src/man/man3socket/sockaddr.3socket b/usr/src/man/man3socket/sockaddr.3socket
index 740b80e4dd..3d5af60020 100644
--- a/usr/src/man/man3socket/sockaddr.3socket
+++ b/usr/src/man/man3socket/sockaddr.3socket
@@ -198,9 +198,9 @@ 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
+.Xr ntohs 3C
and write to the member with the function
-.Xr htons 3SOCKET .
+.Xr htons 3C .
The member
.Em sin_addr
is the four byte IPv4 address.
@@ -264,9 +264,9 @@ byte order.
The member
.Em sin6_port
describes the IPv6 port and should be manipulated with the functions
-.Xr ntohs 3SOCKET
+.Xr ntohs 3C
and
-.Xr htons 3SOCKET .
+.Xr htons 3C .
The member
.Em sin6_addr
describes the 16-byte IPv6 address.
@@ -426,9 +426,9 @@ 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
+.Xr htons 3C
and
-.Xr ntohs 3SOCKET
+.Xr ntohs 3C
to read and write the member.
.Lp
The member
diff --git a/usr/src/man/man5/byteorder.5 b/usr/src/man/man5/byteorder.5
index 4b33ac411b..88470e101c 100644
--- a/usr/src/man/man5/byteorder.5
+++ b/usr/src/man/man5/byteorder.5
@@ -11,7 +11,7 @@
.\"
.\" Copyright 2016 Joyent, Inc.
.\"
-.Dd January 31, 2016
+.Dd August 2, 2018
.Dt BYTEORDER 5
.Os
.Sh NAME
@@ -202,12 +202,12 @@ check the byte order and convert it appropriately.
The system provides two different sets of functions to convert values
between big-endian and little-endian.
They are defined in
-.Xr byteorder 3SOCKET
+.Xr byteorder 3C
and
.Xr endian 3C .
.Pp
The
-.Xr byteorder 3SOCKET
+.Xr byteorder 3C
family of functions convert data between the host's native byte order
and big- or little-endian.
The functions operate on either 16-bit, 32-bit, or 64-bit values.
@@ -219,23 +219,23 @@ order, begin with
.Sy hton .
For example, to convert a 32-bit value, a long, from network byte order
to the host's, one would use the function
-.Xr ntohl 3SOCKET .
+.Xr ntohl 3C .
.Pp
These functions have been standardized by POSIX.
However, the 64-bit variants,
-.Xr ntohll 3SOCKET
+.Xr ntohll 3C
and
-.Xr htonll 3SOCKET
+.Xr htonll 3C
are not standardized and may not be found on other systems.
For more information on these functions, see
-.Xr byteorder 3SOCKET .
+.Xr byteorder 3C .
.Pp
The second family of functions,
.Xr endian 3C ,
provide a means to convert between the host's byte order
and big-endian and little-endian specifically.
While these functions are similar to those in
-.Xr byteorder 3SOCKET ,
+.Xr byteorder 3C ,
they more explicitly cover different data conversions.
Like them, these functions operate on either 16-bit, 32-bit, or 64-bit values.
When converting from big-endian, to the host's endianness, the functions
@@ -254,17 +254,17 @@ to little-endian respectively.
These functions are not standardized and the header they appear in varies
between the BSDs and GNU/Linux.
Applications that wish to be portable, shoulda instead use the
-.Xr byteorder 3SOCKET
+.Xr byteorder 3C
functions.
.Pp
All of these functions in both families simply return their input when
the host's native byte order is the same as the desired order.
For example, when calling
-.Xr htonl 3SOCKET
+.Xr htonl 3C
on a big-endian system the original data is returned with no conversion
or modification.
.Sh SEE ALSO
+.Xr byteorder 3C ,
.Xr endian 3C ,
.Xr endian.h 3HEAD ,
-.Xr inet 3HEAD ,
-.Xr byteorder 3SOCKET
+.Xr inet 3HEAD
diff --git a/usr/src/man/man7p/inet.7p b/usr/src/man/man7p/inet.7p
index 385fcdfa72..541892768b 100644
--- a/usr/src/man/man7p/inet.7p
+++ b/usr/src/man/man7p/inet.7p
@@ -84,7 +84,7 @@ Get interface network mask.
.LP
\fBIP\fR addresses are four byte quantities, stored in network byte order.
\fBIP\fR addresses should be manipulated using the byte order conversion
-routines. See \fBbyteorder\fR(3SOCKET).
+routines. See \fBbyteorder\fR(3C).
.sp
.LP
Addresses in the Internet protocol family use the \fBsockaddr_in\fR structure,
@@ -153,7 +153,7 @@ numbers. These semantics apply when Internet family protocols are used using
the \fBTLI\fR.
.SH SEE ALSO
.LP
-\fBioctl\fR(2), \fBbind\fR(3SOCKET), \fBbyteorder\fR(3SOCKET),
+\fBioctl\fR(2), \fBbind\fR(3SOCKET), \fBbyteorder\fR(3C),
\fBconnect\fR(3SOCKET), \fBgethostbyname\fR(3NSL), \fBgetnetbyname\fR(3SOCKET),
\fBgetprotobyname\fR(3SOCKET), \fBgetservbyname\fR(3SOCKET),
\fBgetsockopt\fR(3SOCKET), \fBsend\fR(3SOCKET), \fBsockaddr\fR(3SOCKET),
diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc
index f5a26a2072..26ae074cb8 100644
--- a/usr/src/pkg/manifests/system-library.man3c.inc
+++ b/usr/src/pkg/manifests/system-library.man3c.inc
@@ -54,6 +54,7 @@ file path=usr/share/man/man3c/bsd_signal.3c
file path=usr/share/man/man3c/bsearch.3c
file path=usr/share/man/man3c/bstring.3c
file path=usr/share/man/man3c/btowc.3c
+file path=usr/share/man/man3c/byteorder.3c
file path=usr/share/man/man3c/call_once.3c
file path=usr/share/man/man3c/catgets.3c
file path=usr/share/man/man3c/catopen.3c
@@ -885,6 +886,9 @@ link path=usr/share/man/man3c/htobe64.3c target=endian.3c
link path=usr/share/man/man3c/htole16.3c target=endian.3c
link path=usr/share/man/man3c/htole32.3c target=endian.3c
link path=usr/share/man/man3c/htole64.3c target=endian.3c
+link path=usr/share/man/man3c/htonl.3c target=byteorder.3c
+link path=usr/share/man/man3c/htonll.3c target=byteorder.3c
+link path=usr/share/man/man3c/htons.3c target=byteorder.3c
link path=usr/share/man/man3c/inet6.3c target=inet.3c
link path=usr/share/man/man3c/inet_addr.3c target=inet.3c
link path=usr/share/man/man3c/inet_aton.3c target=inet.3c
@@ -1032,6 +1036,9 @@ link path=usr/share/man/man3c/nftw.3c target=ftw.3c
link path=usr/share/man/man3c/ngettext.3c target=gettext.3c
link path=usr/share/man/man3c/nl_langinfo_l.3c target=nl_langinfo.3c
link path=usr/share/man/man3c/nrand48.3c target=drand48.3c
+link path=usr/share/man/man3c/ntohl.3c target=byteorder.3c
+link path=usr/share/man/man3c/ntohll.3c target=byteorder.3c
+link path=usr/share/man/man3c/ntohs.3c target=byteorder.3c
link path=usr/share/man/man3c/openlog.3c target=syslog.3c
link path=usr/share/man/man3c/pclose.3c target=popen.3c
link path=usr/share/man/man3c/port_dissociate.3c target=port_associate.3c
diff --git a/usr/src/pkg/manifests/system-library.man3socket.inc b/usr/src/pkg/manifests/system-library.man3socket.inc
index 20a32905cb..b1db6325cd 100644
--- a/usr/src/pkg/manifests/system-library.man3socket.inc
+++ b/usr/src/pkg/manifests/system-library.man3socket.inc
@@ -17,7 +17,6 @@
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
@@ -110,9 +109,6 @@ link path=usr/share/man/man3socket/getservent.3socket \
target=getservbyname.3socket
link path=usr/share/man/man3socket/getservent_r.3socket \
target=getservbyname.3socket
-link path=usr/share/man/man3socket/htonl.3socket target=byteorder.3socket
-link path=usr/share/man/man3socket/htonll.3socket target=byteorder.3socket
-link path=usr/share/man/man3socket/htons.3socket target=byteorder.3socket
link path=usr/share/man/man3socket/if_freenameindex.3socket \
target=if_nametoindex.3socket
link path=usr/share/man/man3socket/if_indextoname.3socket \
@@ -145,9 +141,6 @@ link path=usr/share/man/man3socket/inet6_rth_segments.3socket \
target=inet6_rth.3socket
link path=usr/share/man/man3socket/inet6_rth_space.3socket \
target=inet6_rth.3socket
-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