-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\" and Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
.\" <mtk.manpages@gmail.com>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" References consulted:
.\" Linux libc source code
.\" Add discussion of Classful Addressing, noting that it is obsolete.
.\" Added an EXAMPLE program.
.\"
-.TH INET 3 2008-06-19 "GNU" "Linux Programmer's Manual"
+.TH INET 3 2014-04-19 "GNU" "Linux Programmer's Manual"
.SH NAME
inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof,
inet_netof \- Internet address manipulation routines
.I b
is interpreted as a 24-bit value that defines the rightmost three bytes
of the binary address.
-This notation is suitable for specifying (outmoded) Class C
+This notation is suitable for specifying (outmoded) Class A
network addresses.
.TP
.I a
.IR "IPv4 dotted-decimal notation"
(or sometimes:
.IR "IPv4 dotted-quad notation" ).
+
+If
+.BR inet_aton ()
+returns 1 if the supplied string was successfully interpreted,
+or 0 if the string is invalid
+.RB ( errno
+is
+.I not
+set on error).
.PP
The
.BR inet_addr ()
};
.fi
.in
-.SH "CONFORMING TO"
+.SH CONFORMING TO
4.3BSD.
.BR inet_addr ()
and
}
if (inet_aton(argv[1], &addr) == 0) {
- perror("inet_aton");
+ fprintf(stderr, "Invalid address\\n");
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
}
.fi
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR byteorder (3),
.BR getaddrinfo (3),
.BR gethostbyname (3),
.BR getnameinfo (3),
.BR getnetent (3),
+.BR inet_net_pton (3),
.BR inet_ntop (3),
.BR inet_pton (3),
.BR hosts (5),
.BR networks (5)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.