+GLOBAL bool
+ngt_IPStrToBin(const char *ip_str, struct in_addr *inaddr)
+{
+ /* AF is always AF_INET for now */
+#ifdef HAVE_INET_ATON
+ if (inet_aton(ip_str, inaddr) == 0)
+ return false;
+#else
+ inaddr->s_addr = inet_addr(ip_str);
+ if (inaddr->s_addr == (unsigned)-1)
+ return false;
+#endif
+ return true;
+}
+
+
+
+