s4-smbtorture: Make test names lowercase and dot-separated.
[sfrench/samba-autobuild/.git] / lib / util / util_net.h
index 6eacfc395f2bb2e4f9e82749b5e7e8ab99fab6db..530311e5c866f89798a6b86880de64a5051e2c86 100644 (file)
@@ -43,4 +43,34 @@ bool interpret_string_addr_prefer_ipv4(struct sockaddr_storage *pss,
                                       const char *str,
                                       int flags);
 
+void set_sockaddr_port(struct sockaddr *psa, uint16_t port);
+
+/**
+ Check if an IP is the 0.0.0.0.
+**/
+_PUBLIC_ bool is_zero_ip_v4(struct in_addr ip);
+
+/**
+ Are two IPs on the same subnet?
+**/
+_PUBLIC_ bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
+
+/**
+ Return true if a string could be a pure IP address.
+**/
+_PUBLIC_ bool is_ipaddress(const char *str);
+
+/**
+ Interpret an internet address or name into an IP address in 4 byte form.
+**/
+_PUBLIC_ uint32_t interpret_addr(const char *str);
+
+/**
+ A convenient addition to interpret_addr().
+**/
+_PUBLIC_ struct in_addr interpret_addr2(const char *str);
+
+_PUBLIC_ bool is_ipaddress_v4(const char *str);
+
+
 #endif /* _SAMBA_UTIL_NET_H_ */