libutil: moved the networking defines to util_net.h
authorAndrew Tridgell <tridge@samba.org>
Fri, 26 Mar 2010 06:36:02 +0000 (17:36 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 26 Mar 2010 06:36:02 +0000 (17:36 +1100)
These were causing thousands of warnings on solaris8

18 files changed:
lib/util/util.h
lib/util/util_net.c
lib/util/util_net.h
libcli/nbt/nbtname.c
librpc/ndr/ndr_basic.c
librpc/rpc/binding.c
nsswitch/libwbclient/tests/wbclient.c
source4/auth/gensec/gensec_gssapi.c
source4/auth/gensec/gensec_krb5.c
source4/lib/socket/access.c
source4/lib/socket/interface.c
source4/lib/socket/socket_ip.c
source4/libcli/resolve/resolve.c
source4/libcli/resolve/testsuite.c
source4/libcli/smb_composite/connect.c
source4/librpc/tests/binding_string.c
source4/nbt_server/interfaces.c
source4/nbt_server/wins/winsserver.c

index 2d4a02549fe624b82e6ee469627db0f28aebac11..b89a7d60508f2354c135f7e419a7e5192aa6df93 100644 (file)
@@ -662,33 +662,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?
 **/
index 9e47f51764be39b1d9839c2da4f21bd762e9309c..00a5ee4ced4db8d5a295b65d2b833114e89850e0 100644 (file)
@@ -27,6 +27,7 @@
 #include "system/network.h"
 #include "system/locale.h"
 #include "system/filesys.h"
+#include "lib/util/util_net.h"
 #undef strcasecmp
 
 /*******************************************************************
index 5dc4df5e1275db125ae4f07a7449c72c7c5050f2..530311e5c866f89798a6b86880de64a5051e2c86 100644 (file)
@@ -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_ */
index f890b91261748d0ad3b61668604f980e9b8d24d3..385905abf19bbeb3a6c77e0cfa8f00ebcbe57634 100644 (file)
@@ -27,6 +27,7 @@
 #include "librpc/gen_ndr/ndr_nbt.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "system/locale.h"
+#include "lib/util/util_net.h"
 
 /* don't allow an unlimited number of name components */
 #define MAX_COMPONENTS 10
index 1fd6fdea7416f35c157e70555c1013beca84753a..f7d6ee04498bb8e7f6823c079d1f46a1f0457def 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "librpc/ndr/libndr.h"
+#include "lib/util/util_net.h"
 
 #define NDR_SVAL(ndr, ofs) (NDR_BE(ndr)?RSVAL(ndr->data,ofs):SVAL(ndr->data,ofs))
 #define NDR_IVAL(ndr, ofs) (NDR_BE(ndr)?RIVAL(ndr->data,ofs):IVAL(ndr->data,ofs))
index 3f15eef926e80a68511c747aedb281302a40b230..e3edc67882dab995d353f22f5a54e1826cbdcd69 100644 (file)
@@ -23,6 +23,7 @@
 */
 
 #include "includes.h"
+#include "../../lib/util/util_net.h"
 #include "librpc/gen_ndr/ndr_epmapper.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/rpc/dcerpc.h"
index 6d4ea86de3f55654446b14ae0eae9d01791ea6f8..007404024df2e94863975f97a74e0cdc43e8d7d0 100644 (file)
@@ -22,6 +22,7 @@
 #include "nsswitch/libwbclient/wbc_async.h"
 #include "torture/smbtorture.h"
 #include "torture/winbind/proto.h"
+#include "lib/util/util_net.h"
 
 #define WBC_ERROR_EQUAL(x,y) (x == y)
 
index a50190f04c827303201243bf338d6daf6a6d3124..6d59bbe612bae432884612eec3265f28e91afa79 100644 (file)
@@ -40,6 +40,7 @@
 #include <gssapi/gssapi_krb5.h>
 #include <gssapi/gssapi_spnego.h>
 #include "auth/gensec/gensec_gssapi.h"
+#include "lib/util/util_net.h"
 
 static size_t gensec_gssapi_max_input_size(struct gensec_security *gensec_security);
 static size_t gensec_gssapi_max_wrapped_size(struct gensec_security *gensec_security);
index e8beb4ca0fab55ccd20505da8b7649218101a3df..9a96e5e98389fc706db1b36b1c4becd3ad393ab3 100644 (file)
@@ -35,6 +35,7 @@
 #include "auth/gensec/gensec_proto.h"
 #include "param/param.h"
 #include "auth/auth_sam_reply.h"
+#include "lib/util/util_net.h"
 
 enum GENSEC_KRB5_STATE {
        GENSEC_KRB5_SERVER_START,
index 42c42db365e38390b780f1505de57c81a982453a..ab39d63ef5bd4e30e6cb1ccc3335802ad08b53d4 100644 (file)
@@ -34,6 +34,7 @@
 #include "system/network.h"
 #include "lib/socket/socket.h"
 #include "system/locale.h"
+#include "lib/util/util_net.h"
 
 #define        FAIL            (-1)
 #define ALLONES  ((uint32_t)0xFFFFFFFF)
index af81804911f192014608ed516f2dbcb45113aade..433b212244fcad983982c69416d44462d486832d 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "lib/socket/netif.h"
+#include "../lib/util/util_net.h"
 #include "../lib/util/dlinklist.h"
 
 /** used for network interfaces */
index 89b310a23afcd5c9ef25e7df17d55059c36e3c68..8ee12d8916030370cb370afee7f45b3884ea8e6a 100644 (file)
@@ -25,6 +25,7 @@
 #include "system/filesys.h"
 #include "lib/socket/socket.h"
 #include "system/network.h"
+#include "lib/util/util_net.h"
 
 static NTSTATUS ipv4_init(struct socket_context *sock)
 {
index 77f7f4f46bde632025eecebf68b2c995652ecb3d..9359b8f5828b93e6749c20f053d997c17dace7e1 100644 (file)
@@ -28,6 +28,7 @@
 #include "lib/socket/socket.h"
 #include "../lib/util/dlinklist.h"
 #include "lib/tsocket/tsocket.h"
+#include "lib/util/util_net.h"
 
 struct resolve_state {
        struct resolve_context *ctx;
index fdbb430a9fbbce5d835994d29110fab1eb9b4f7e..86e133b5241a2da734405240dad50de844761381 100644 (file)
@@ -24,6 +24,7 @@
 #include "libcli/resolve/resolve.h"
 #include "torture/torture.h"
 #include "system/network.h"
+#include "lib/util/util_net.h"
 
 static bool test_async_resolve(struct torture_context *tctx)
 {
index 14e8a1ab7f78d0af14b7d991568c4f6a6eae81ba..16f2af9b3df701af5a382abb2dd6eea3f1385a7d 100644 (file)
@@ -30,6 +30,7 @@
 #include "auth/credentials/credentials.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
 #include "param/param.h"
+#include "lib/util/util_net.h"
 
 /* the stages of this call */
 enum connect_stage {CONNECT_SOCKET, 
index 01cdfae80d0e6ecd7b170212b1f20bb4cb4315bc..6de94eb58b401fe336ed4f47fc7084e7fe86e2a8 100644 (file)
@@ -24,6 +24,7 @@
 #include "librpc/rpc/dcerpc.h"
 #include "librpc/rpc/dcerpc_proto.h"
 #include "torture/torture.h"
+#include "lib/util/util_net.h"
 
 static bool test_BindingString(struct torture_context *tctx,
                                                           const void *test_data)
index 0a9196a74753dc535456e35c0c4f56d8ef5de4dc..99c5886fd9d3b97eff5ee95b9b9807fee7de418b 100644 (file)
@@ -29,6 +29,7 @@
 #include "system/network.h"
 #include "lib/socket/netif.h"
 #include "param/param.h"
+#include "lib/util/util_net.h"
 
 
 /*
index 95d22242b31cdb359105799993c4478c88ca5de2..ff4c5fdbb96486a82f0434ed869b33c3e14c838f 100644 (file)
@@ -35,6 +35,7 @@
 #include "lib/ldb/include/ldb.h"
 #include "param/param.h"
 #include "libcli/resolve/resolve.h"
+#include "lib/util/util_net.h"
 
 /*
   work out the ttl we will use given a client requested ttl