home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source$
- * $Date$
- * $Revision$
- * $State$
- * $Author$
- *
- * $Log$
- ***************************************************************************/
-
- static const char rcs_id[] = "$Id$";
-
- #include <stdio.h>
-
- #include <arpa/inet.h>
- #include <netinet/in.h>
-
- /*
- * Format an internet address in string form
- */
- char *
- inet_ntoa (struct in_addr in)
- {
- static char string[16];
-
- /* Print the string into the buffer */
- sprintf (string, "%ld.%ld.%ld.%ld", in.s_addr & 0xff,
- (in.s_addr >> 8) & 0xff, (in.s_addr >> 16) & 0xff,
- (in.s_addr >> 24) & 0xff);
-
- return string;
- }
-