1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-02 20:23:50 +03:00

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
This commit is contained in:
Stefan Metzmacher
2006-08-17 13:37:04 +00:00
committed by Gerald (Jerry) Carter
parent 113ef01320
commit f20e251bfd
32 changed files with 88 additions and 80 deletions

View File

@@ -28,7 +28,7 @@
#include "smbd/service.h" #include "smbd/service.h"
#include "cldap_server/cldap_server.h" #include "cldap_server/cldap_server.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
handle incoming cldap requests handle incoming cldap requests

View File

@@ -33,7 +33,7 @@
#include "auth/auth.h" #include "auth/auth.h"
#include "db_wrap.h" #include "db_wrap.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
fill in the cldap netlogon union for a given version fill in the cldap netlogon union for a given version

View File

@@ -23,7 +23,7 @@
#include "includes.h" #include "includes.h"
#include "system/network.h" #include "system/network.h"
#include "system/kerberos.h" #include "system/kerberos.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
get the list of IP addresses for configured interfaces get the list of IP addresses for configured interfaces

View File

@@ -35,7 +35,7 @@
#include "lib/messaging/irpc.h" #include "lib/messaging/irpc.h"
#include "lib/stream/packet.h" #include "lib/stream/packet.h"
#include "librpc/gen_ndr/samr.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 */ /* hold all the info needed to send a reply */
struct kdc_reply { struct kdc_reply {

View File

@@ -36,7 +36,7 @@
#include "lib/ldb/include/ldb.h" #include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h" #include "lib/ldb/include/ldb_errors.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
close the socket and shutdown a server_context close the socket and shutdown a server_context

View File

@@ -17,17 +17,6 @@ include stream/config.mk
include util/config.mk include util/config.mk
include tdr/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 # Start SUBSYSTEM LIBCRYPTO
[SUBSYSTEM::LIBCRYPTO] [SUBSYSTEM::LIBCRYPTO]

View File

@@ -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

View File

@@ -97,3 +97,54 @@ if $have_ipv6 = true; then
fi fi
dnl don't build ipv6 by default, unless the above test enables it, or dnl don't build ipv6 by default, unless the above test enables it, or
dnl the configure uses --with-static-modules=socket_ipv6 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

View File

@@ -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 # Start MODULE socket_ipv4

View File

@@ -22,7 +22,7 @@
#include "includes.h" #include "includes.h"
#include "system/network.h" #include "system/network.h"
#include "lib/netif/netif.h" #include "lib/socket/netif.h"
#include "dlinklist.h" #include "dlinklist.h"
/** used for network interfaces */ /** used for network interfaces */

View File

@@ -29,5 +29,5 @@ struct iface_struct {
#define MAX_INTERFACES 128 #define MAX_INTERFACES 128
#ifndef AUTOCONF_TEST #ifndef AUTOCONF_TEST
#include "lib/netif/proto.h" #include "lib/socket/netif_proto.h"
#endif #endif

View File

@@ -23,7 +23,7 @@
#include "includes.h" #include "includes.h"
#include "libcli/resolve/resolve.h" #include "libcli/resolve/resolve.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
broadcast name resolution method - async send broadcast name resolution method - async send

View File

@@ -27,7 +27,7 @@
#include "includes.h" #include "includes.h"
#include "libcli/composite/composite.h" #include "libcli/composite/composite.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h" #include "librpc/gen_ndr/ndr_nbt.h"
#include "libcli/nbt/libnbt.h" #include "libcli/nbt/libnbt.h"

View File

@@ -29,7 +29,7 @@
#include "lib/stream/packet.h" #include "lib/stream/packet.h"
#include "libcli/composite/composite.h" #include "libcli/composite/composite.h"
#include "system/network.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); static struct wrepl_request *wrepl_request_finished(struct wrepl_request *req, NTSTATUS status);

View File

@@ -28,7 +28,7 @@
#include "nbt_server/wins/winsserver.h" #include "nbt_server/wins/winsserver.h"
#include "nbt_server/dgram/proto.h" #include "nbt_server/dgram/proto.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*

View File

@@ -26,7 +26,7 @@
#include "nbt_server/nbt_server.h" #include "nbt_server/nbt_server.h"
#include "nbt_server/wins/winsserver.h" #include "nbt_server/wins/winsserver.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
startup the nbtd task startup the nbtd task

View File

@@ -35,7 +35,7 @@
#include "lib/ldb/include/ldb_errors.h" #include "lib/ldb/include/ldb_errors.h"
#include "lib/ldb/include/ldb_private.h" #include "lib/ldb/include/ldb_private.h"
#include "system/network.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) static int wins_ldb_verify(struct ldb_module *module, struct ldb_request *req)
{ {

View File

@@ -30,7 +30,7 @@
#include "system/time.h" #include "system/time.h"
#include "db_wrap.h" #include "db_wrap.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
uint64_t winsdb_get_maxVersion(struct winsdb_handle *h) uint64_t winsdb_get_maxVersion(struct winsdb_handle *h)
{ {

View File

@@ -30,7 +30,7 @@
#include "smbd/service.h" #include "smbd/service.h"
#include "lib/messaging/irpc.h" #include "lib/messaging/irpc.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "auth/auth.h" #include "auth/auth.h"
struct dcesrv_socket_context { struct dcesrv_socket_context {

View File

@@ -25,7 +25,7 @@
#include "lib/appweb/ejs/ejs.h" #include "lib/appweb/ejs/ejs.h"
#include "param/loadparm.h" #include "param/loadparm.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
return a list of defined services return a list of defined services

View File

@@ -26,7 +26,7 @@
#include "lib/ldb/include/ldb.h" #include "lib/ldb/include/ldb.h"
#include "system/time.h" #include "system/time.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
/* /*
return the list of configured network interfaces return the list of configured network interfaces

View File

@@ -30,7 +30,7 @@
#include "libcli/smb2/smb2.h" #include "libcli/smb2/smb2.h"
#include "smb_server/smb2/smb2_server.h" #include "smb_server/smb2/smb2_server.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "param/share.h" #include "param/share.h"
static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob) static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)

View File

@@ -24,7 +24,7 @@
#include "lib/socket/socket.h" #include "lib/socket/socket.h"
#include "lib/events/events.h" #include "lib/events/events.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "torture/torture.h" #include "torture/torture.h"
/* /*

View File

@@ -30,7 +30,7 @@
#include "torture/rpc/rpc.h" #include "torture/rpc/rpc.h"
#include "libcli/resolve/resolve.h" #include "libcli/resolve/resolve.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#define TEST_NAME "TORTURE_TEST" #define TEST_NAME "TORTURE_TEST"

View File

@@ -24,7 +24,7 @@
#include "lib/socket/socket.h" #include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h" #include "libcli/resolve/resolve.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "torture/torture.h" #include "torture/torture.h"
#define CHECK_VALUE(v, correct) do { \ #define CHECK_VALUE(v, correct) do { \

View File

@@ -24,7 +24,7 @@
#include "lib/socket/socket.h" #include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h" #include "libcli/resolve/resolve.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h" #include "librpc/gen_ndr/ndr_nbt.h"
#include "torture/torture.h" #include "torture/torture.h"

View File

@@ -25,7 +25,7 @@
#include "lib/socket/socket.h" #include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h" #include "libcli/resolve/resolve.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "torture/torture.h" #include "torture/torture.h"
struct wins_state { struct wins_state {

View File

@@ -27,7 +27,7 @@
#include "lib/socket/socket.h" #include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h" #include "libcli/resolve/resolve.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h" #include "librpc/gen_ndr/ndr_nbt.h"
#include "torture/torture.h" #include "torture/torture.h"

View File

@@ -27,7 +27,7 @@
#include "lib/socket/socket.h" #include "lib/socket/socket.h"
#include "system/network.h" #include "system/network.h"
#include "system/locale.h" #include "system/locale.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "librpc/gen_ndr/nbt.h" #include "librpc/gen_ndr/nbt.h"
#include "libcli/nbt/libnbt.h" #include "libcli/nbt/libnbt.h"

View File

@@ -28,7 +28,7 @@
#include "lib/events/events.h" #include "lib/events/events.h"
#include "system/filesys.h" #include "system/filesys.h"
#include "system/network.h" #include "system/network.h"
#include "netif/netif.h" #include "lib/socket/netif.h"
#include "lib/tls/tls.h" #include "lib/tls/tls.h"
/* don't allow connections to hang around forever */ /* don't allow connections to hang around forever */

View File

@@ -31,7 +31,7 @@
#include "wrepl_server/wrepl_server.h" #include "wrepl_server/wrepl_server.h"
#include "smbd/process_model.h" #include "smbd/process_model.h"
#include "system/network.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) void wreplsrv_terminate_in_connection(struct wreplsrv_in_connection *wreplconn, const char *reason)
{ {