Use common net utility code (address and sockaddr manipulation).
[samba.git] / lib / util / util.h
index fc651d58af2da3e28e7944aab591c2f990120c04..c2407ae9c9f260c9d2bbaa78ce2469adbdf275bb 100644 (file)
@@ -44,6 +44,7 @@ extern const char *panic_action;
 #include "../lib/util/xfile.h"
 #include "../lib/util/mutex.h"
 #include "../lib/util/byteorder.h"
+#include "../lib/util/talloc_stack.h"
 
 /**
  * assert macros 
@@ -540,12 +541,14 @@ _PUBLIC_ struct in_addr interpret_addr2(const char *str);
 /**
  Check if an IP is the 0.0.0.0.
 **/
-_PUBLIC_ bool is_zero_ip(struct in_addr ip);
+_PUBLIC_ bool is_zero_ip_v4(struct in_addr ip);
 
 /**
  Are two IPs on the same subnet?
 **/
-_PUBLIC_ bool same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
+_PUBLIC_ bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
+
+_PUBLIC_ bool is_ipaddress_v4(const char *str);
 
 /**
  Check if a process exists. Does this work on all unixes?