aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/net/inet.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/inet.3')
-rw-r--r--lib/libc/net/inet.326
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3
index 69ccf3df9e77..9b822fd6805a 100644
--- a/lib/libc/net/inet.3
+++ b/lib/libc/net/inet.3
@@ -25,8 +25,6 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" From: @(#)inet.3 8.1 (Berkeley) 6/4/93
-.\"
.Dd November 9, 2021
.Dt INET 3
.Os
@@ -175,10 +173,15 @@ All Internet addresses are returned in network
order (bytes ordered from left to right).
All network numbers and local address parts are
returned as machine byte order integer values.
-.Sh INTERNET ADDRESSES
-Values specified using the
+.Sh INTERNET ADDRESSES (IP VERSION 4)
+The
+.Fn inet_aton
+and
+.Fn inet_addr
+functions accept IPv4
+values specified using the
.Ql .\&
-notation take one
+notation in one
of the following forms:
.Bd -literal -offset indent
a.b.c.d
@@ -212,6 +215,13 @@ may be decimal, octal, or hexadecimal, as specified
in the C language (i.e., a leading 0x or 0X implies
hexadecimal; otherwise, a leading 0 implies octal;
otherwise, the number is interpreted as decimal).
+.Pp
+Note that
+.Fn inet_pton
+does not accept 1-, 2-, or 3-part dotted addresses; all four parts
+must be specified and are interpreted only as decimal values.
+This is a narrower input set than that accepted by
+.Fn inet_aton .
.Sh DIAGNOSTICS
The constant
.Dv INADDR_NONE
@@ -258,12 +268,6 @@ and
.Fn inet_pton
functions conform to
.St -xns5.2 .
-Note that
-.Fn inet_pton
-does not accept 1-, 2-, or 3-part dotted addresses; all four parts
-must be specified and are interpreted only as decimal values.
-This is a narrower input set than that accepted by
-.Fn inet_aton .
.Sh HISTORY
These
functions appeared in