diff options
Diffstat (limited to 'lib/libc/net/inet.3')
-rw-r--r-- | lib/libc/net/inet.3 | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3 index 9318f45..6ad1bc6 100644 --- a/lib/libc/net/inet.3 +++ b/lib/libc/net/inet.3 @@ -29,9 +29,10 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)inet.3 8.1 (Berkeley) 6/4/93 +.\" From: @(#)inet.3 8.1 (Berkeley) 6/4/93 +.\" $Id: inet.3,v 1.5 1997/02/22 15:00:15 peter Exp $ .\" -.Dd June 4, 1993 +.Dd June 17, 1996 .Dt INET 3 .Os BSD 4.2 .Sh NAME @@ -44,19 +45,20 @@ .Nm inet_netof .Nd Internet address manipulation routines .Sh SYNOPSIS +.Fd #include <sys/types.h> .Fd #include <sys/socket.h> .Fd #include <netinet/in.h> .Fd #include <arpa/inet.h> .Ft int -.Fn inet_aton "char *cp" "struct in_addr *pin" +.Fn inet_aton "const char *cp" "struct in_addr *pin" .Ft unsigned long -.Fn inet_addr "char *cp" +.Fn inet_addr "const char *cp" .Ft unsigned long -.Fn inet_network "char *cp" +.Fn inet_network "const char *cp" .Ft char * .Fn inet_ntoa "struct in_addr in" .Ft struct in_addr -.Fn inet_makeaddr "int net" "int lna" +.Fn inet_makeaddr "unsigned long net" "unsigned long lna" .Ft unsigned long .Fn inet_lnaof "struct in_addr in" .Ft unsigned long @@ -159,6 +161,18 @@ 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 +The +.Fn inet_aton +and +.Fn inet_ntoa +functions are semi-deprecated in favor of the +.Xr addr2ascii 3 +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 +functions for some time. .Sh DIAGNOSTICS The constant .Dv INADDR_NONE @@ -168,10 +182,11 @@ and .Fn inet_network for malformed requests. .Sh SEE ALSO +.Xr addr2ascii 3 , .Xr gethostbyname 3 , .Xr getnetent 3 , .Xr hosts 5 , -.Xr networks 5 , +.Xr networks 5 .Sh HISTORY These functions appeared in |