summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-26 17:36:02 +1100
committerAndrew Tridgell <tridge@samba.org>2010-03-26 17:36:02 +1100
commitfae84f98e37e99e41b23739305e7331b3a34ae48 (patch)
treeaea198725ee6e85dd81e8b35d7a93e1c86269a1f /lib/util
parentc81d2ae3c9a4f9b5d2291563f141bb10d64cd650 (diff)
downloadsamba-fae84f98e37e99e41b23739305e7331b3a34ae48.tar.gz
samba-fae84f98e37e99e41b23739305e7331b3a34ae48.tar.bz2
samba-fae84f98e37e99e41b23739305e7331b3a34ae48.zip
libutil: moved the networking defines to util_net.h
These were causing thousands of warnings on solaris8
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/util.h27
-rw-r--r--lib/util/util_net.c1
-rw-r--r--lib/util/util_net.h28
3 files changed, 29 insertions, 27 deletions
diff --git a/lib/util/util.h b/lib/util/util.h
index 2d4a02549f..b89a7d6050 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -663,33 +663,6 @@ _PUBLIC_ void msleep(unsigned int t);
_PUBLIC_ char* get_myname(TALLOC_CTX *mem_ctx);
/**
- 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);
-
-/**
- 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);
-
-_PUBLIC_ bool is_ipaddress_v4(const char *str);
-
-/**
Check if a process exists. Does this work on all unixes?
**/
_PUBLIC_ bool process_exists_by_pid(pid_t pid);
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index 9e47f51764..00a5ee4ced 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -27,6 +27,7 @@
#include "system/network.h"
#include "system/locale.h"
#include "system/filesys.h"
+#include "lib/util/util_net.h"
#undef strcasecmp
/*******************************************************************
diff --git a/lib/util/util_net.h b/lib/util/util_net.h
index 5dc4df5e12..530311e5c8 100644
--- a/lib/util/util_net.h
+++ b/lib/util/util_net.h
@@ -45,4 +45,32 @@ bool interpret_string_addr_prefer_ipv4(struct sockaddr_storage *pss,
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_ */