+#include "network.h"
+
+#if !defined(HAVE_INET_ATON)
+#include <stdlib.h>
+#include <strings.h>
+
+int inet_aton (const char * str, struct in_addr * add)
+{
+ unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
+
+ if (sscanf(str, "%d.%d.%d.%d", &add1, &add2, &add3, &add4) != 4)
+ return 0;
+
+ if (!add1 || (add1|add2|add3|add4) > 255) return 0;
+
+ add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1;
+
+ return 1;
+}
+#endif /* !defined(HAVE_INET_ATON) */
+
+/* resolve host with also IP address parsing */
+int resolve_host(struct in_addr *sin_addr, const char *hostname)