![]() Chapter Contents |
![]() Previous |
![]() Next |
| inet_ntoa |
| Portability: | UNIX compatible |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUE | |
| CAUTION | |
| PORTABILITY | |
| IMPLEMENTATION | |
| RELATED FUNCTIONS |
| SYNOPSIS |
#include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> char *inet_ntoa(struct in_addr in);
| DESCRIPTION |
inet_ntoa
takes an Internet address,
in
, and returns a pointer to a null-terminated string representing
the address in dotted decimal notation. The dotted decimal string has four
components. The host address is specified in network byte order because it
is contained in a
struct in_addr
.
| RETURN VALUE |
If
inet_ntoa
is successful, it returns a pointer to the Internet address
in dotted decimal notation.
| CAUTION |
The string value is contained in a static
character array. You must copy this value if you plan to refer to it after
a subsequent
inet_ntoa
call.
| PORTABILITY |
inet_ntoa
is portable to other environments, including most UNIX systems,
that implement BSD sockets.
| IMPLEMENTATION |
The SAS/C version of
inet_ntoa
is a direct port from the BSD UNIX
Socket Library.
| RELATED FUNCTIONS |
inet_addr
,
inet_lnaof
,
inet_makeaddr
,
inet_network
,
inet_netof
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.