summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-08-17 13:37:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:39 -0500
commitf20e251bfd9f1eb7ce5c00739631b1625a2aa467 (patch)
tree9995f8a5c2770a3380ef39387f36f1e22fdef2eb /source
parent113ef0132037f3e3db61f259eee903a4584219f7 (diff)
downloadsamba-f20e251bfd9f1eb7ce5c00739631b1625a2aa467.tar.gz
r17586: merge lib/netif into lib/socket and use -lnsl -lsocket on the
configure check for the interfaces. should fix the build on some old sun boxes metze
Diffstat (limited to 'source')
-rw-r--r--source/cldap_server/cldap_server.c2
-rw-r--r--source/cldap_server/netlogon.c2
-rw-r--r--source/heimdal_build/glue.c2
-rw-r--r--source/kdc/kdc.c2
-rw-r--r--source/ldap_server/ldap_server.c2
-rw-r--r--source/lib/basic.mk11
-rw-r--r--source/lib/netif/config.m442
-rw-r--r--source/lib/socket/config.m451
-rw-r--r--source/lib/socket/config.mk10
-rw-r--r--source/lib/socket/interface.c (renamed from source/lib/netif/interface.c)2
-rw-r--r--source/lib/socket/netif.c (renamed from source/lib/netif/netif.c)0
-rw-r--r--source/lib/socket/netif.h (renamed from source/lib/netif/netif.h)2
-rw-r--r--source/libcli/resolve/bcast.c2
-rw-r--r--source/libcli/resolve/nbtlist.c2
-rw-r--r--source/libcli/wrepl/winsrepl.c2
-rw-r--r--source/nbt_server/interfaces.c2
-rw-r--r--source/nbt_server/nbt_server.c2
-rw-r--r--source/nbt_server/wins/wins_ldb.c2
-rw-r--r--source/nbt_server/wins/winsdb.c2
-rw-r--r--source/rpc_server/dcerpc_sock.c2
-rw-r--r--source/scripting/ejs/smbcalls_config.c2
-rw-r--r--source/scripting/ejs/smbcalls_sys.c2
-rw-r--r--source/smb_server/smb_server.c2
-rw-r--r--source/torture/local/socket.c2
-rw-r--r--source/torture/nbt/dgram.c2
-rw-r--r--source/torture/nbt/register.c2
-rw-r--r--source/torture/nbt/wins.c2
-rw-r--r--source/torture/nbt/winsbench.c2
-rw-r--r--source/torture/nbt/winsreplication.c2
-rw-r--r--source/utils/nmblookup.c2
-rw-r--r--source/web_server/web_server.c2
-rw-r--r--source/wrepl_server/wrepl_in_connection.c2
32 files changed, 88 insertions, 80 deletions
diff --git a/source/cldap_server/cldap_server.c b/source/cldap_server/cldap_server.c
index 3687eb52188..4c1c7b86c53 100644
--- a/source/cldap_server/cldap_server.c
+++ b/source/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/source/cldap_server/netlogon.c b/source/cldap_server/netlogon.c
index 903764abf1c..4e7274f4834 100644
--- a/source/cldap_server/netlogon.c
+++ b/source/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/source/heimdal_build/glue.c b/source/heimdal_build/glue.c
index bf64360c433..333b768fef6 100644
--- a/source/heimdal_build/glue.c
+++ b/source/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/source/kdc/kdc.c b/source/kdc/kdc.c
index 10e0764e233..c9df63a2113 100644
--- a/source/kdc/kdc.c
+++ b/source/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/source/ldap_server/ldap_server.c b/source/ldap_server/ldap_server.c
index 718e3e07739..9b4055f8cf6 100644
--- a/source/ldap_server/ldap_server.c
+++ b/source/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/source/lib/basic.mk b/source/lib/basic.mk
index bce5b85b328..145adfa3f09 100644
--- a/source/lib/basic.mk
+++ b/source/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/source/lib/netif/config.m4 b/source/lib/netif/config.m4
deleted file mode 100644
index 9880440f216..00000000000
--- a/source/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/source/lib/socket/config.m4 b/source/lib/socket/config.m4
index 7ea7e2b8094..0965cd12453 100644
--- a/source/lib/socket/config.m4
+++ b/source/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/source/lib/socket/config.mk b/source/lib/socket/config.mk
index 1e22edb1d78..a823efb23e5 100644
--- a/source/lib/socket/config.mk
+++ b/source/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/source/lib/netif/interface.c b/source/lib/socket/interface.c
index 019b05cfbbe..5b2b4fd1ab5 100644
--- a/source/lib/netif/interface.c
+++ b/source/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/source/lib/netif/netif.c b/source/lib/socket/netif.c
index 0344febf380..0344febf380 100644
--- a/source/lib/netif/netif.c
+++ b/source/lib/socket/netif.c
diff --git a/source/lib/netif/netif.h b/source/lib/socket/netif.h
index 558fda47922..ad7c31eb9e5 100644
--- a/source/lib/netif/netif.h
+++ b/source/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/source/libcli/resolve/bcast.c b/source/libcli/resolve/bcast.c
index 1b58918ea79..8824ad395ea 100644
--- a/source/libcli/resolve/bcast.c
+++ b/source/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/source/libcli/resolve/nbtlist.c b/source/libcli/resolve/nbtlist.c
index a8ca2ced8b8..9d7035c26d3 100644
--- a/source/libcli/resolve/nbtlist.c
+++ b/source/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/source/libcli/wrepl/winsrepl.c b/source/libcli/wrepl/winsrepl.c
index a1735c547cf..bf0be9fb9ba 100644
--- a/source/libcli/wrepl/winsrepl.c
+++ b/source/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/source/nbt_server/interfaces.c b/source/nbt_server/interfaces.c
index 1cfe79bb9f7..2ce9688e4db 100644
--- a/source/nbt_server/interfaces.c
+++ b/source/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/source/nbt_server/nbt_server.c b/source/nbt_server/nbt_server.c
index 43772eee07b..d8f6a83e945 100644
--- a/source/nbt_server/nbt_server.c
+++ b/source/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/source/nbt_server/wins/wins_ldb.c b/source/nbt_server/wins/wins_ldb.c
index 5bd1783c690..f5f9e0e327c 100644
--- a/source/nbt_server/wins/wins_ldb.c
+++ b/source/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/source/nbt_server/wins/winsdb.c b/source/nbt_server/wins/winsdb.c
index fc415363773..e51b589f320 100644
--- a/source/nbt_server/wins/winsdb.c
+++ b/source/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/source/rpc_server/dcerpc_sock.c b/source/rpc_server/dcerpc_sock.c
index 946052e61d2..3808cc01304 100644
--- a/source/rpc_server/dcerpc_sock.c
+++ b/source/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/source/scripting/ejs/smbcalls_config.c b/source/scripting/ejs/smbcalls_config.c
index 2827920bd0e..5da0dd14f01 100644
--- a/source/scripting/ejs/smbcalls_config.c
+++ b/source/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/source/scripting/ejs/smbcalls_sys.c b/source/scripting/ejs/smbcalls_sys.c
index 860002e1d78..d8aaf3898a7 100644
--- a/source/scripting/ejs/smbcalls_sys.c
+++ b/source/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/source/smb_server/smb_server.c b/source/smb_server/smb_server.c
index 56ca686baf4..4fbc428a42c 100644
--- a/source/smb_server/smb_server.c
+++ b/source/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/source/torture/local/socket.c b/source/torture/local/socket.c
index 70baae712d7..a49e0dd93ea 100644
--- a/source/torture/local/socket.c
+++ b/source/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/source/torture/nbt/dgram.c b/source/torture/nbt/dgram.c
index d847595e3d8..def8adaa48b 100644
--- a/source/torture/nbt/dgram.c
+++ b/source/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/source/torture/nbt/register.c b/source/torture/nbt/register.c
index 1663adcdf22..b72b80ab264 100644
--- a/source/torture/nbt/register.c
+++ b/source/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/source/torture/nbt/wins.c b/source/torture/nbt/wins.c
index 3062fb1a301..44ac61fe460 100644
--- a/source/torture/nbt/wins.c
+++ b/source/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/source/torture/nbt/winsbench.c b/source/torture/nbt/winsbench.c
index f0e90ec9321..6541de8e16e 100644
--- a/source/torture/nbt/winsbench.c
+++ b/source/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/source/torture/nbt/winsreplication.c b/source/torture/nbt/winsreplication.c
index e66d840e4d0..fe0d0784e12 100644
--- a/source/torture/nbt/winsreplication.c
+++ b/source/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/source/utils/nmblookup.c b/source/utils/nmblookup.c
index b9057d49346..3192b0924c3 100644
--- a/source/utils/nmblookup.c
+++ b/source/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/source/web_server/web_server.c b/source/web_server/web_server.c
index 5329880d8d0..6264b67e0c6 100644
--- a/source/web_server/web_server.c
+++ b/source/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/source/wrepl_server/wrepl_in_connection.c b/source/wrepl_server/wrepl_in_connection.c
index fc44b8912c5..a7522a0165f 100644
--- a/source/wrepl_server/wrepl_in_connection.c
+++ b/source/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)
{