@comment The start of a comment is indicated by the following comment. This @comment syntax is used by the script funcstxh.sh: @comment function @comment function inet_ntoa @node inet_ntoa, socket @findex inet_ntoa @c This file was originally a Linux man page - see the copyright below. It @c was modified for use in libsocket by Richard Dawe . @c Hey Emacs! This file is -*- nroff -*- source. @c @c Copyright 1993 David Metcalfe (david@prism.demon.co.uk) @c @c Permission is granted to make and distribute verbatim copies of this @c manual provided the copyright notice and this permission notice are @c preserved on all copies. @c @c Permission is granted to copy and distribute modified versions of this @c manual under the conditions for verbatim copying, provided that the @c entire resulting derived work is distributed under the terms of a @c permission notice identical to this one @c @c Since the Linux kernel and libraries are constantly changing, this @c manual page may be incorrect or out-of-date. The author(s) assume no @c responsibility for errors or omissions, or for damages resulting from @c the use of the information contained herein. The author(s) may not @c have taken the same level of care in the production of this manual, @c which is licensed free of charge, as they might when working @c professionally. @c @c Formatted or processed versions of this manual, if unaccompanied by @c the source, must acknowledge the copyright and authors of this work. @c @c References consulted: @c Linux libc source code @c Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) @c 386BSD man pages @c libc.info (from glibc distribution) @c Modified Sat Jul 24 19:12:00 1993 by Rik Faith (faith@cs.unc.edu) @c Modified Sun Sep 3 20:29:36 1995 by Jim Van Zandt @subheading Syntax @example #include #include #include char *inet_ntoa (struct in_addr in); @end example @subheading Description The @code{inet_ntoa()} function converts the Internet host address @var{in} given in network byte order to a string in standard numbers-and-dots notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite. The structure @samp{in_addr} is defined in @samp{netinet/in.h} as: @example struct in_addr @{ unsigned long int s_addr; @} @end example Note that on the i80x86 the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first. @subheading Return Value @code{inet_ntoa()} returns a pointer to the address in string form. @subheading Portability @portability unix98 @subheading Example @example @end example