AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" = "yes"])
AM_CONDITIONAL([WITH_MACOS], [test "$with_macos" = "yes"])
-# We don't support the daemon yet
if test "$with_win" = "yes" ; then
+ # We don't support the daemon yet
with_libvirtd=no
+
+ # For AI_ADDRCONFIG
+ AC_DEFINE([_WIN32_WINNT], [0x0600], [Win Vista / Server 2008])
+ AC_DEFINE([WINVER], [0x0600], [Win Vista / Server 2008])
fi
# The daemon requires remote support. Likewise, if we are not using
linux/magic.h \
mntent.h \
net/ethernet.h \
- netinet/tcp.h \
net/if.h \
pty.h \
pwd.h \
sys/syscall.h \
sys/sysctl.h \
sys/ucred.h \
- sys/un.h \
])
dnl Check whether endian provides handy macros.
AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]])
#include <config.h>
#include <unistd.h>
-#include <arpa/inet.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <config.h>
-#include <netdb.h>
-
#include "internal.h"
#include "datatypes.h"
#include "viralloc.h"
#include "esx_private.h"
#include "esx_util.h"
#include "virstring.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_ESX
#pragma once
-#include <netdb.h>
#include "internal.h"
#include "viruri.h"
#include <libxl.h>
#include <sys/types.h>
-#include <sys/socket.h>
#include "internal.h"
#include "virlog.h"
#include "virnetdevvportprofile.h"
#include "virenum.h"
-
#define VIR_FROM_THIS VIR_FROM_LIBXL
VIR_LOG_INIT("libxl.libxl_conf");
#include <sys/epoll.h>
#include <sys/wait.h>
-#include <sys/socket.h>
#ifdef MAJOR_IN_MKDEV
# include <sys/mkdev.h>
# include <sys/sysmacros.h>
#endif
-#include <sys/types.h>
-#include <sys/un.h>
#include <sys/personality.h>
#include <unistd.h>
#include <fcntl.h>
#include "rpc/virnetdaemon.h"
#include "virstring.h"
#include "virgettext.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_LXC
# include <sys/sysmacros.h>
#endif
-#include <sys/types.h>
-#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/un.h>
#include <sys/poll.h>
#include <unistd.h>
#include <wait.h>
#include "viraccessapichecklxc.h"
#include "virhostdev.h"
#include "netdev_bandwidth_conf.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include <fcntl.h>
#include <poll.h>
-#include <arpa/inet.h>
-#include <netinet/ip.h>
-#include <netinet/udp.h>
#include <net/if.h>
#include "viralloc.h"
#include <sys/ioctl.h>
#include <poll.h>
-#include <arpa/inet.h>
#include <net/ethernet.h>
-#include <netinet/ip.h>
-#include <netinet/udp.h>
#include <net/if_arp.h>
#include "internal.h"
#include "nwfilter_ipaddrmap.h"
#include "nwfilter_learnipaddr.h"
#include "virstring.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_NWFILTER
#include <config.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
#include <poll.h>
#include <unistd.h>
#include <fcntl.h>
#include "virobject.h"
#include "virstring.h"
#include "virenum.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
-#include <arpa/inet.h>
#include "virerror.h"
#include "qemu_conf.h"
#include "cpu/cpu.h"
#include "domain_nwfilter.h"
#include "virfile.h"
-#include "virsocketaddr.h"
+#include "virsocket.h"
#include "virstring.h"
#include "viratomic.h"
#include "storage_conf.h"
#include <signal.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
-#include <sys/un.h>
-
#include "qemu_driver.h"
#include "qemu_agent.h"
#include "virdomainsnapshotobjlist.h"
#include "virenum.h"
#include "virdomaincheckpointobjlist.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include <config.h>
-#include <netdb.h>
-#include <sys/socket.h>
#include <sys/time.h>
#include <fcntl.h>
#include <poll.h>
#include "virprocess.h"
#include "nwfilter_conf.h"
#include "virdomainsnapshotobjlist.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include <config.h>
#include <poll.h>
-#include <sys/socket.h>
-#include <sys/un.h>
#include <unistd.h>
#include <fcntl.h>
#include "virprobe.h"
#include "virstring.h"
#include "virtime.h"
+#include "virsocket.h"
#ifdef WITH_DTRACE_PROBES
# include "libvirt_qemu_probes.h"
#include <config.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
#include <poll.h>
#include <unistd.h>
#include <sys/time.h>
#include "virstring.h"
#include "cpu/cpu_x86.h"
#include "virenum.h"
+#include "virsocket.h"
#ifdef WITH_DTRACE_PROBES
# include "libvirt_qemu_probes.h"
%#include "internal.h"
%#include "remote_protocol.h"
-%#include <arpa/inet.h>
/*----- Protocol. -----*/
struct qemu_domain_monitor_command_args {
%#include <libvirt/libvirt.h>
%#include "internal.h"
%#include "virxdrdefs.h"
-%#include <arpa/inet.h>
+%#include "virsocket.h"
/*----- Data types. -----*/
%#include "internal.h"
%#include "virxdrdefs.h"
-%#include <arpa/inet.h>
+%#include "virsocket.h"
/*----- Data types. -----*/
#include <config.h>
#include <sys/stat.h>
-#include <sys/socket.h>
#include <unistd.h>
#include <sys/wait.h>
#include <signal.h>
#ifdef HAVE_IFADDRS_H
# include <ifaddrs.h>
#endif
-#include <netdb.h>
-
-#ifdef HAVE_NETINET_TCP_H
-# include <netinet/tcp.h>
-#endif
#ifdef HAVE_SYS_UCRED_H
# include <sys/ucred.h>
}
-#if HAVE_SYS_UN_H
+#ifndef WIN32
int virNetSocketNewListenUNIX(const char *path,
mode_t mask,
uid_t user,
}
-#ifdef HAVE_SYS_UN_H
+#ifndef WIN32
int virNetSocketNewConnectUNIX(const char *path,
bool spawnDaemon,
const char *binary,
sock->watch = -1;
}
-#ifdef HAVE_SYS_UN_H
+#ifndef WIN32
/* If a server socket, then unlink UNIX path */
if (sock->unlinkUNIX &&
sock->localAddr.data.sa.sa_family == AF_UNIX &&
sock->fd = -1;
}
-#ifdef HAVE_SYS_UN_H
+#ifndef WIN32
/* If a server socket, then unlink UNIX path */
if (sock->unlinkUNIX &&
sock->localAddr.data.sa.sa_family == AF_UNIX &&
#include <config.h>
-#include <arpa/inet.h>
#ifdef __linux__
# include <linux/rtnetlink.h>
#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <sys/socket.h>
#include <sys/wait.h>
-#if HAVE_SYS_UN_H
-# include <sys/un.h>
-#endif
-#include <netinet/in.h>
#ifndef WIN32
# include <termios.h>
#endif
#include "virstring.h"
#include "virtime.h"
#include "virprocess.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_STREAMS
}
-#if HAVE_SYS_UN_H
+#ifndef WIN32
int virFDStreamConnectUNIX(virStreamPtr st,
const char *path,
bool abstract)
# include <libutil.h>
#endif /* !HAVE_LIBUTIL_H */
#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include <sys/wait.h>
#if defined(HAVE_SYS_MOUNT_H)
# include <sys/mount.h>
#include "virprocess.h"
#include "virstring.h"
#include "virutil.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include <stdarg.h>
#include <time.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#if HAVE_SYSLOG_H
# include <syslog.h>
#endif
-#include <sys/socket.h>
-#if HAVE_SYS_UN_H
-# include <sys/un.h>
-#endif
#include "virerror.h"
#include "virlog.h"
#include "virtime.h"
#include "virstring.h"
#include "configmake.h"
+#include "virsocket.h"
/* Journald output is only supported on Linux new enough to expose
* htole64. */
#include "viralloc.h"
#include "virlog.h"
#include "virstring.h"
+#include "virsocket.h"
-#ifndef WIN32
-# include <sys/ioctl.h>
-#endif
-#include <sys/socket.h>
#ifdef HAVE_NET_IF
# include <net/if.h>
#endif
-#include <netinet/in.h>
#ifdef __linux__
# if defined(HAVE_LIBNL)
#if WITH_MACVTAP
# include <fcntl.h>
-# include <sys/socket.h>
-# include <sys/ioctl.h>
# include <net/if.h>
# include <linux/if_tun.h>
# include "virnetdev.h"
# include "virpidfile.h"
# include "virbitmap.h"
+# include "virsocket.h"
VIR_LOG_INIT("util.netdevmacvlan");
#if WITH_VIRTUALPORT
# include <fcntl.h>
-# include <sys/socket.h>
-# include <sys/ioctl.h>
# include <net/if.h>
# include <linux/if_tun.h>
# include "virfile.h"
# include "virlog.h"
# include "virnetdev.h"
+# include "virsocket.h"
VIR_LOG_INIT("util.netdevvportprofile");
#include <config.h>
#include <unistd.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include "virnetlink.h"
#include "virnetdev.h"
#include "virmacaddr.h"
#include "virerror.h"
#include "viralloc.h"
+#include "virsocket.h"
#define VIR_FROM_THIS VIR_FROM_NET
#else
# include <sys/socket.h>
-# include <unistd.h>
# include <sys/ioctl.h>
# include <arpa/inet.h>
+# include <netinet/ip.h>
# include <netinet/in.h>
# include <netinet/udp.h>
# include <netinet/tcp.h>
# include <sys/un.h>
+# include <netdb.h>
# define closesocket close
# define ioctlsocket ioctl
#include "virbuffer.h"
#include "viralloc.h"
-#include <netdb.h>
-
#define VIR_FROM_THIS VIR_FROM_NONE
/*
#pragma once
-#include <netinet/in.h>
-#include <sys/socket.h>
-#ifdef HAVE_SYS_UN_H
-# include <sys/un.h>
-#endif
-
-#include "internal.h"
+#include "virsocket.h"
#define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1"
struct sockaddr_storage stor;
struct sockaddr_in inet4;
struct sockaddr_in6 inet6;
-#ifdef HAVE_SYS_UN_H
+#ifndef WIN32
struct sockaddr_un un;
#endif
} data;
#include <config.h>
-#include <sys/socket.h>
-#ifdef HAVE_SYS_UN_H
-# include <sys/un.h>
-#endif
-
#define LIBVIRT_VIRSYSTEMDPRIV_H_ALLOW
#include "virsystemdpriv.h"
void
virSystemdNotifyStartup(void)
{
-#ifdef HAVE_SYS_UN_H
+#ifndef WIN32
const char *path;
const char *msg = "READY=1";
int fd;
VIR_WARN("Failed to notify systemd");
VIR_FORCE_CLOSE(fd);
-#endif /* HAVE_SYS_UN_H */
+#endif /* !WIN32 */
}
static int
# include <libdevmapper.h>
#endif
-#include <netdb.h>
#ifdef HAVE_GETPWUID_R
# include <pwd.h>
# include <grp.h>
# include <sys/prctl.h>
#endif
-#ifdef WIN32
-# ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-# endif
-# include <windows.h>
-# include <shlobj.h>
-#endif
-
-#ifdef HAVE_SYS_UN_H
-# include <sys/un.h>
-#endif
-
#include "virerror.h"
#include "virlog.h"
#include "virbuffer.h"
#include <config.h>
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif
-#include <windows.h>
-
#define nsCID CLSID
#include "internal.h"
#include "virerror.h"
#include "virstring.h"
#include "virutil.h"
+#include "virsocket.h"
#include "vbox_MSCOMGlue.h"
#define VIR_FROM_THIS VIR_FROM_VBOX
# include <libxl.h>
# include <xenstore.h>
# include <xenctrl.h>
-# include <sys/socket.h>
# include "virfile.h"
+# include "virsocket.h"
VIR_MOCK_IMPL_RET_VOID(xs_daemon_open,
struct xs_handle *)
#ifdef NSS
-# include <arpa/inet.h>
# include "libvirt_nss.h"
-# include "virsocketaddr.h"
+# include "virsocket.h"
# define VIR_FROM_THIS VIR_FROM_NONE
#ifdef HAVE_IFADDRS_H
# include <ifaddrs.h>
#endif
-#include <netdb.h>
#include "testutils.h"
#include "virutil.h"
#include <config.h>
#include <fcntl.h>
-#include <sys/socket.h>
#include "testutils.h"
#include "virnettlshelpers.h"
#include "virlog.h"
#include "virfile.h"
#include "vircommand.h"
-#include "virsocketaddr.h"
+#include "virsocket.h"
#if !defined WIN32 && HAVE_LIBTASN1_H && LIBGNUTLS_VERSION_NUMBER >= 0x020600
#include <config.h>
#include <fcntl.h>
-#include <sys/socket.h>
#include "virnettlshelpers.h"
#include "viralloc.h"
#include <config.h>
#include <fcntl.h>
-#include <sys/socket.h>
#include "testutils.h"
#include "virnettlshelpers.h"
#include "virlog.h"
#include "virfile.h"
#include "vircommand.h"
-#include "virsocketaddr.h"
+#include "virsocket.h"
#if !defined WIN32 && HAVE_LIBTASN1_H && LIBGNUTLS_VERSION_NUMBER >= 0x020600
#endif
#if defined(__linux__) && defined(RTLD_NEXT)
-# include "internal.h"
-# include <sys/socket.h>
-# include <arpa/inet.h>
-# include <netinet/in.h>
+# include "virsocket.h"
# include <unistd.h>
static bool host_has_ipv6;
#include "virmock.h"
#include <unistd.h>
-#include <sys/types.h>
#include <fcntl.h>
#include <sys/file.h>
#include <sys/stat.h>
-#include <sys/socket.h>
-#ifdef HAVE_SYS_UN_H
-# include <sys/un.h>
-#endif
-#include "internal.h"
+#include "virsocket.h"
#include "configmake.h"
#include "virstring.h"
#include "viralloc.h"
{
init_syms();
-#ifdef HAVE_SYS_UN_H
+#ifndef WIN32
if (addrlen == sizeof(struct sockaddr_un)) {
struct sockaddr_un *tmp = (struct sockaddr_un *) addr;
if (tmp->sun_family == AF_UNIX)