summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/cldap_server/cldap_server.c2
-rw-r--r--source4/cldap_server/netlogon.c2
-rw-r--r--source4/heimdal_build/glue.c2
-rw-r--r--source4/kdc/kdc.c2
-rw-r--r--source4/ldap_server/ldap_server.c2
-rw-r--r--source4/lib/basic.mk11
-rw-r--r--source4/lib/netif/config.m442
-rw-r--r--source4/lib/socket/config.m451
-rw-r--r--source4/lib/socket/config.mk10
-rw-r--r--source4/lib/socket/interface.c (renamed from source4/lib/netif/interface.c)2
-rw-r--r--source4/lib/socket/netif.c (renamed from source4/lib/netif/netif.c)0
-rw-r--r--source4/lib/socket/netif.h (renamed from source4/lib/netif/netif.h)2
-rw-r--r--source4/libcli/resolve/bcast.c2
-rw-r--r--source4/libcli/resolve/nbtlist.c2
-rw-r--r--source4/libcli/wrepl/winsrepl.c2
-rw-r--r--source4/nbt_server/interfaces.c2
-rw-r--r--source4/nbt_server/nbt_server.c2
-rw-r--r--source4/nbt_server/wins/wins_ldb.c2
-rw-r--r--source4/nbt_server/wins/winsdb.c2
-rw-r--r--source4/rpc_server/dcerpc_sock.c2
-rw-r--r--source4/scripting/ejs/smbcalls_config.c2
-rw-r--r--source4/scripting/ejs/smbcalls_sys.c2
-rw-r--r--source4/smb_server/smb_server.c2
-rw-r--r--source4/torture/local/socket.c2
-rw-r--r--source4/torture/nbt/dgram.c2
-rw-r--r--source4/torture/nbt/register.c2
-rw-r--r--source4/torture/nbt/wins.c2
-rw-r--r--source4/torture/nbt/winsbench.c2
-rw-r--r--source4/torture/nbt/winsreplication.c2
-rw-r--r--source4/utils/nmblookup.c2
-rw-r--r--source4/web_server/web_server.c2
-rw-r--r--source4/wrepl_server/wrepl_in_connection.c2
32 files changed, 88 insertions, 80 deletions
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c
index 3687eb5218..4c1c7b86c5 100644
--- a/source4/cldap_server/cldap_server.c
+++ b/source4/cldap_server/cldap_server.c
@@ -28,7 +28,7 @@
#include "smbd/service.h"
#include "cldap_server/cldap_server.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
handle incoming cldap requests
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 903764abf1..4e7274f483 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -33,7 +33,7 @@
#include "auth/auth.h"
#include "db_wrap.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
fill in the cldap netlogon union for a given version
diff --git a/source4/heimdal_build/glue.c b/source4/heimdal_build/glue.c
index bf64360c43..333b768fef 100644
--- a/source4/heimdal_build/glue.c
+++ b/source4/heimdal_build/glue.c
@@ -23,7 +23,7 @@
#include "includes.h"
#include "system/network.h"
#include "system/kerberos.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
get the list of IP addresses for configured interfaces
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 10e0764e23..c9df63a211 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -35,7 +35,7 @@
#include "lib/messaging/irpc.h"
#include "lib/stream/packet.h"
#include "librpc/gen_ndr/samr.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/* hold all the info needed to send a reply */
struct kdc_reply {
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 718e3e0773..9b4055f8cf 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -36,7 +36,7 @@
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
close the socket and shutdown a server_context
diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk
index bce5b85b32..145adfa3f0 100644
--- a/source4/lib/basic.mk
+++ b/source4/lib/basic.mk
@@ -18,17 +18,6 @@ include util/config.mk
include tdr/config.mk
##############################
-# Start SUBSYSTEM LIBNETIF
-[SUBSYSTEM::LIBNETIF]
-PRIVATE_PROTO_HEADER = netif/proto.h
-OBJ_FILES = \
- netif/interface.o \
- netif/netif.o
-PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL EXT_NSL
-# End SUBSYSTEM LIBNETIF
-##############################
-
-##############################
# Start SUBSYSTEM LIBCRYPTO
[SUBSYSTEM::LIBCRYPTO]
OBJ_FILES = \
diff --git a/source4/lib/netif/config.m4 b/source4/lib/netif/config.m4
deleted file mode 100644
index 9880440f21..0000000000
--- a/source4/lib/netif/config.m4
+++ /dev/null
@@ -1,42 +0,0 @@
-AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h sys/time.h)
-AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
-
-##################
-# look for a method of finding the list of network interfaces
-iface=no;
-AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[
-AC_TRY_RUN([
-#define HAVE_IFACE_AIX 1
-#define AUTOCONF_TEST 1
-#include "confdefs.h"
-#include "${srcdir-.}/lib/netif/netif.c"],
- samba_cv_HAVE_IFACE_AIX=yes,samba_cv_HAVE_IFACE_AIX=no,samba_cv_HAVE_IFACE_AIX=cross)])
-if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
- iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
-fi
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[
-AC_TRY_RUN([
-#define HAVE_IFACE_IFCONF 1
-#define AUTOCONF_TEST 1
-#include "confdefs.h"
-#include "${srcdir-.}/lib/netif/netif.c"],
- samba_cv_HAVE_IFACE_IFCONF=yes,samba_cv_HAVE_IFACE_IFCONF=no,samba_cv_HAVE_IFACE_IFCONF=cross)])
-if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
- iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
-fi
-fi
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface ifreq],samba_cv_HAVE_IFACE_IFREQ,[
-AC_TRY_RUN([
-#define HAVE_IFACE_IFREQ 1
-#define AUTOCONF_TEST 1
-#include "confdefs.h"
-#include "${srcdir-.}/lib/netif/netif.c"],
- samba_cv_HAVE_IFACE_IFREQ=yes,samba_cv_HAVE_IFACE_IFREQ=no,samba_cv_HAVE_IFACE_IFREQ=cross)])
-if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
- iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available])
-fi
-fi
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4
index 7ea7e2b809..0965cd1245 100644
--- a/source4/lib/socket/config.m4
+++ b/source4/lib/socket/config.m4
@@ -97,3 +97,54 @@ if $have_ipv6 = true; then
fi
dnl don't build ipv6 by default, unless the above test enables it, or
dnl the configure uses --with-static-modules=socket_ipv6
+
+AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h sys/time.h)
+AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
+
+
+##################
+# look for a method of finding the list of network interfaces
+#
+# This tests need LIBS="$NSL_LIBS $SOCKET_LIBS"
+#
+old_LIBS=$LIBS
+LIBS="$NSL_LIBS $SOCKET_LIBS"
+iface=no;
+AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[
+AC_TRY_RUN([
+#define HAVE_IFACE_AIX 1
+#define AUTOCONF_TEST 1
+#include "confdefs.h"
+#include "${srcdir-.}/lib/socket/netif.c"],
+ samba_cv_HAVE_IFACE_AIX=yes,samba_cv_HAVE_IFACE_AIX=no,samba_cv_HAVE_IFACE_AIX=cross)])
+if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
+ iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
+fi
+
+if test $iface = no; then
+AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[
+AC_TRY_RUN([
+#define HAVE_IFACE_IFCONF 1
+#define AUTOCONF_TEST 1
+#include "confdefs.h"
+#include "${srcdir-.}/lib/socket/netif.c"],
+ samba_cv_HAVE_IFACE_IFCONF=yes,samba_cv_HAVE_IFACE_IFCONF=no,samba_cv_HAVE_IFACE_IFCONF=cross)])
+if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
+ iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
+fi
+fi
+
+if test $iface = no; then
+AC_CACHE_CHECK([for iface ifreq],samba_cv_HAVE_IFACE_IFREQ,[
+AC_TRY_RUN([
+#define HAVE_IFACE_IFREQ 1
+#define AUTOCONF_TEST 1
+#include "confdefs.h"
+#include "${srcdir-.}/lib/socket/netif.c"],
+ samba_cv_HAVE_IFACE_IFREQ=yes,samba_cv_HAVE_IFACE_IFREQ=no,samba_cv_HAVE_IFACE_IFREQ=cross)])
+if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
+ iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available])
+fi
+fi
+
+LIBS=$old_LIBS
diff --git a/source4/lib/socket/config.mk b/source4/lib/socket/config.mk
index 1e22edb1d7..a823efb23e 100644
--- a/source4/lib/socket/config.mk
+++ b/source4/lib/socket/config.mk
@@ -1,3 +1,13 @@
+##############################
+# Start SUBSYSTEM LIBNETIF
+[SUBSYSTEM::LIBNETIF]
+PRIVATE_PROTO_HEADER = netif_proto.h
+OBJ_FILES = \
+ interface.o \
+ netif.o
+PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL EXT_SOCKET EXT_NSL
+# End SUBSYSTEM LIBNETIF
+##############################
################################################
# Start MODULE socket_ipv4
diff --git a/source4/lib/netif/interface.c b/source4/lib/socket/interface.c
index 019b05cfbb..5b2b4fd1ab 100644
--- a/source4/lib/netif/interface.c
+++ b/source4/lib/socket/interface.c
@@ -22,7 +22,7 @@
#include "includes.h"
#include "system/network.h"
-#include "lib/netif/netif.h"
+#include "lib/socket/netif.h"
#include "dlinklist.h"
/** used for network interfaces */
diff --git a/source4/lib/netif/netif.c b/source4/lib/socket/netif.c
index 0344febf38..0344febf38 100644
--- a/source4/lib/netif/netif.c
+++ b/source4/lib/socket/netif.c
diff --git a/source4/lib/netif/netif.h b/source4/lib/socket/netif.h
index 558fda4792..ad7c31eb9e 100644
--- a/source4/lib/netif/netif.h
+++ b/source4/lib/socket/netif.h
@@ -29,5 +29,5 @@ struct iface_struct {
#define MAX_INTERFACES 128
#ifndef AUTOCONF_TEST
-#include "lib/netif/proto.h"
+#include "lib/socket/netif_proto.h"
#endif
diff --git a/source4/libcli/resolve/bcast.c b/source4/libcli/resolve/bcast.c
index 1b58918ea7..8824ad395e 100644
--- a/source4/libcli/resolve/bcast.c
+++ b/source4/libcli/resolve/bcast.c
@@ -23,7 +23,7 @@
#include "includes.h"
#include "libcli/resolve/resolve.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
broadcast name resolution method - async send
diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c
index a8ca2ced8b..9d7035c26d 100644
--- a/source4/libcli/resolve/nbtlist.c
+++ b/source4/libcli/resolve/nbtlist.c
@@ -27,7 +27,7 @@
#include "includes.h"
#include "libcli/composite/composite.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "libcli/nbt/libnbt.h"
diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c
index a1735c547c..bf0be9fb9b 100644
--- a/source4/libcli/wrepl/winsrepl.c
+++ b/source4/libcli/wrepl/winsrepl.c
@@ -29,7 +29,7 @@
#include "lib/stream/packet.h"
#include "libcli/composite/composite.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
static struct wrepl_request *wrepl_request_finished(struct wrepl_request *req, NTSTATUS status);
diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c
index 1cfe79bb9f..2ce9688e4d 100644
--- a/source4/nbt_server/interfaces.c
+++ b/source4/nbt_server/interfaces.c
@@ -28,7 +28,7 @@
#include "nbt_server/wins/winsserver.h"
#include "nbt_server/dgram/proto.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c
index 43772eee07..d8f6a83e94 100644
--- a/source4/nbt_server/nbt_server.c
+++ b/source4/nbt_server/nbt_server.c
@@ -26,7 +26,7 @@
#include "nbt_server/nbt_server.h"
#include "nbt_server/wins/winsserver.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
startup the nbtd task
diff --git a/source4/nbt_server/wins/wins_ldb.c b/source4/nbt_server/wins/wins_ldb.c
index 5bd1783c69..f5f9e0e327 100644
--- a/source4/nbt_server/wins/wins_ldb.c
+++ b/source4/nbt_server/wins/wins_ldb.c
@@ -35,7 +35,7 @@
#include "lib/ldb/include/ldb_errors.h"
#include "lib/ldb/include/ldb_private.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
static int wins_ldb_verify(struct ldb_module *module, struct ldb_request *req)
{
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index fc41536377..e51b589f32 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -30,7 +30,7 @@
#include "system/time.h"
#include "db_wrap.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
uint64_t winsdb_get_maxVersion(struct winsdb_handle *h)
{
diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c
index 946052e61d..3808cc0130 100644
--- a/source4/rpc_server/dcerpc_sock.c
+++ b/source4/rpc_server/dcerpc_sock.c
@@ -30,7 +30,7 @@
#include "smbd/service.h"
#include "lib/messaging/irpc.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "auth/auth.h"
struct dcesrv_socket_context {
diff --git a/source4/scripting/ejs/smbcalls_config.c b/source4/scripting/ejs/smbcalls_config.c
index 2827920bd0..5da0dd14f0 100644
--- a/source4/scripting/ejs/smbcalls_config.c
+++ b/source4/scripting/ejs/smbcalls_config.c
@@ -25,7 +25,7 @@
#include "lib/appweb/ejs/ejs.h"
#include "param/loadparm.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
return a list of defined services
diff --git a/source4/scripting/ejs/smbcalls_sys.c b/source4/scripting/ejs/smbcalls_sys.c
index 860002e1d7..d8aaf3898a 100644
--- a/source4/scripting/ejs/smbcalls_sys.c
+++ b/source4/scripting/ejs/smbcalls_sys.c
@@ -26,7 +26,7 @@
#include "lib/ldb/include/ldb.h"
#include "system/time.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
/*
return the list of configured network interfaces
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 56ca686baf..4fbc428a42 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -30,7 +30,7 @@
#include "libcli/smb2/smb2.h"
#include "smb_server/smb2/smb2_server.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "param/share.h"
static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)
diff --git a/source4/torture/local/socket.c b/source4/torture/local/socket.c
index 70baae712d..a49e0dd93e 100644
--- a/source4/torture/local/socket.c
+++ b/source4/torture/local/socket.c
@@ -24,7 +24,7 @@
#include "lib/socket/socket.h"
#include "lib/events/events.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "torture/torture.h"
/*
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index d847595e3d..def8adaa48 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -30,7 +30,7 @@
#include "torture/rpc/rpc.h"
#include "libcli/resolve/resolve.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#define TEST_NAME "TORTURE_TEST"
diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c
index 1663adcdf2..b72b80ab26 100644
--- a/source4/torture/nbt/register.c
+++ b/source4/torture/nbt/register.c
@@ -24,7 +24,7 @@
#include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "torture/torture.h"
#define CHECK_VALUE(v, correct) do { \
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index 3062fb1a30..44ac61fe46 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -24,7 +24,7 @@
#include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "torture/torture.h"
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index f0e90ec932..6541de8e16 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -25,7 +25,7 @@
#include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "torture/torture.h"
struct wins_state {
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index e66d840e4d..fe0d0784e1 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -27,7 +27,7 @@
#include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "torture/torture.h"
diff --git a/source4/utils/nmblookup.c b/source4/utils/nmblookup.c
index b9057d4934..3192b0924c 100644
--- a/source4/utils/nmblookup.c
+++ b/source4/utils/nmblookup.c
@@ -27,7 +27,7 @@
#include "lib/socket/socket.h"
#include "system/network.h"
#include "system/locale.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "librpc/gen_ndr/nbt.h"
#include "libcli/nbt/libnbt.h"
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 5329880d8d..6264b67e0c 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -28,7 +28,7 @@
#include "lib/events/events.h"
#include "system/filesys.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
#include "lib/tls/tls.h"
/* don't allow connections to hang around forever */
diff --git a/source4/wrepl_server/wrepl_in_connection.c b/source4/wrepl_server/wrepl_in_connection.c
index fc44b8912c..a7522a0165 100644
--- a/source4/wrepl_server/wrepl_in_connection.c
+++ b/source4/wrepl_server/wrepl_in_connection.c
@@ -31,7 +31,7 @@
#include "wrepl_server/wrepl_server.h"
#include "smbd/process_model.h"
#include "system/network.h"
-#include "netif/netif.h"
+#include "lib/socket/netif.h"
void wreplsrv_terminate_in_connection(struct wreplsrv_in_connection *wreplconn, const char *reason)
{