Loading...
net/inet.3 Libc-498 Libc-262
--- Libc/Libc-498/net/inet.3
+++ Libc/Libc-262/net/inet.3
@@ -30,73 +30,51 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     From: @(#)inet.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/inet.3,v 1.29 2004/07/02 23:52:11 ru Exp $
-.\"
-.Dd June 14, 2004
+.\" $FreeBSD: src/lib/libc/net/inet.3,v 1.19 2001/10/01 16:08:55 ru Exp $
+.\"
+.Dd June 17, 1996
 .Dt INET 3
 .Os
 .Sh NAME
+.Nm inet_aton ,
 .Nm inet_addr ,
-.Nm inet_aton ,
-.Nm inet_lnaof ,
-.Nm inet_makeaddr ,
-.Nm inet_netof ,
 .Nm inet_network ,
 .Nm inet_ntoa ,
 .Nm inet_ntop ,
-.Nm inet_pton
+.Nm inet_pton ,
+.Nm inet_makeaddr ,
+.Nm inet_lnaof ,
+.Nm inet_netof
 .Nd Internet address manipulation routines
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
 .In arpa/inet.h
-.Ft in_addr_t
-.Fo inet_addr
-.Fa "const char *cp"
-.Fc
 .Ft int
-.Fo inet_aton
-.Fa "const char *cp"
-.Fa "struct in_addr *pin"
-.Fc
-.Ft in_addr_t
-.Fo inet_lnaof
-.Fa "struct in_addr in"
-.Fc
+.Fn inet_aton "const char *cp" "struct in_addr *pin"
+.Ft in_addr_t
+.Fn inet_addr "const char *cp"
+.Ft in_addr_t
+.Fn inet_network "const char *cp"
+.Ft char *
+.Fn inet_ntoa "struct in_addr in"
+.Ft const char *
+.Fn inet_ntop "int af" "const void *src" "char *dst" "size_t size"
+.Ft int
+.Fn inet_pton "int af" "const char *src" "void *dst"
 .Ft struct in_addr
-.Fo inet_makeaddr
-.Fa "in_addr_t net"
-.Fa "in_addr_t lna"
-.Fc
-.Ft in_addr_t
-.Fo inet_netof
-.Fa "struct in_addr in"
-.Fc
-.Ft in_addr_t
-.Fo inet_network
-.Fa "const char *cp"
-.Fc
-.Ft char *
-.Fo inet_ntoa
-.Fa "struct in_addr in"
-.Fc
-.Ft const char *
-.Fo inet_ntop
-.Fa "int af"
-.Fa "const void *restrict src"
-.Fa "char *restrict dst"
-.Fa "socklen_t size"
-.Fc
-.Ft int
-.Fo inet_pton
-.Fa "int af"
-.Fa "const char *restrict src"
-.Fa "void *restrict dst"
-.Fc
+.Fn inet_makeaddr "in_addr_t net" "in_addr_t lna"
+.Ft in_addr_t
+.Fn inet_lnaof "struct in_addr in"
+.Ft in_addr_t
+.Fn inet_netof "struct in_addr in"
 .Sh DESCRIPTION
 The routines
 .Fn inet_aton ,
-.Fn inet_addr ,
+.Fn inet_addr
 and
 .Fn inet_network
 interpret character strings representing
@@ -136,17 +114,10 @@
 .Pp
 The function
 .Fn inet_ntop
-converts an address
-.Fa *src
-from network format
-(usually a
+converts an address from network format (usually a
 .Ft struct in_addr
 or some other binary form, in network byte order) to presentation format
 (suitable for external display purposes).
-The
-.Fa size
-argument specifies the size, in bytes, of the buffer
-.Fa *dst .
 It returns NULL if a system error occurs (in which case,
 .Va errno
 will have been set), or it returns a pointer to the destination string.
@@ -161,13 +132,11 @@
 .Tn ASCII
 string representing the address in
 .Ql .\&
-notation.
-The routine
+notation.  The routine
 .Fn inet_makeaddr
 takes an Internet network number and a local
 network address and constructs an Internet address
-from it.
-The routines
+from it.  The routines
 .Fn inet_netof
 and
 .Fn inet_lnaof
@@ -193,8 +162,7 @@
 .Pp
 When four parts are specified, each is interpreted
 as a byte of data and assigned, from left to right,
-to the four bytes of an Internet address.
-Note
+to the four bytes of an Internet address.  Note
 that when an Internet address is viewed as a 32-bit
 integer quantity on the
 .Tn VAX
@@ -240,8 +208,7 @@
 .Fn inet_ntoa
 functions are semi-deprecated in favor of the
 .Xr addr2ascii 3
-family.
-However, since those functions are not yet widely implemented,
+family.  However, since those functions are not yet widely implemented,
 portable programs cannot rely on their presence and will continue
 to use the
 .Xr inet 3
@@ -254,36 +221,12 @@
 and
 .Fn inet_network
 for malformed requests.
-.Sh ERRORS
-The
-.Fn inet_ntop
-call fails if:
-.Bl -tag -width Er
-.It Bq Er EAFNOSUPPORT
-.Fa *src
-was not an
-.Dv AF_INET
-or
-.Dv AF_INET6
-family address.
-.It Bq Er ENOSPC
-.Fa size
-was not large enough to store the presentation form of the address.
-.El
-.Sh LEGACY SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <sys/netinet/in.h>
-.Fd #include <sys/arpa/inet.h>
-.Pp
-These include files are necessary for all functions.
 .Sh SEE ALSO
 .Xr addr2ascii 3 ,
 .Xr byteorder 3 ,
 .Xr gethostbyname 3 ,
 .Xr getnetent 3 ,
 .Xr inet_net 3 ,
-.Xr compat 5 ,
 .Xr hosts 5 ,
 .Xr networks 5
 .Rs
@@ -302,7 +245,7 @@
 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.
+must be specified.
 This is a narrower input set than that accepted by
 .Fn inet_aton .
 .Sh HISTORY