summaryrefslogtreecommitdiffstats
path: root/client/x11
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2009-10-16 00:21:43 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-10-18 17:42:37 +0200
commitef213c66c19d265140e9a55519b174d34ff1f16b (patch)
tree0a8e58217f5757881d4d4798d1316dbb3809f37a /client/x11
parent308e4545cbf8d26d5d47ad6ab9f2c6e6e6648003 (diff)
downloadspice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.gz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.xz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.zip
tunnel
Diffstat (limited to 'client/x11')
-rw-r--r--client/x11/Makefile.am6
-rw-r--r--client/x11/platform_utils.h21
2 files changed, 24 insertions, 3 deletions
diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index 2bb1c853..02ee8717 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -39,6 +39,8 @@ RED_COMMON_SRCS = \
$(top_srcdir)/client/red_cairo_canvas.h \
$(top_srcdir)/client/cmd_line_parser.cpp \
$(top_srcdir)/client/cmd_line_parser.h \
+ $(top_srcdir)/client/client_net_socket.cpp \
+ $(top_srcdir)/client/client_net_socket.h \
$(top_srcdir)/client/common.h \
$(top_srcdir)/client/cursor_channel.cpp \
$(top_srcdir)/client/cursor_channel.h \
@@ -94,9 +96,11 @@ RED_COMMON_SRCS = \
$(top_srcdir)/client/hot_keys.cpp \
$(top_srcdir)/client/hot_keys.h \
$(top_srcdir)/client/threads.cpp \
+ $(top_srcdir)/client/tunnel_channel.cpp \
+ $(top_srcdir)/client/tunnel_channel.h \
$(top_srcdir)/client/utils.cpp \
$(top_srcdir)/client/utils.h \
- $(top_srcdir)/client/icon.h \
+ $(top_srcdir)/client/icon.h \
$(NULL)
bin_PROGRAMS = spicec
diff --git a/client/x11/platform_utils.h b/client/x11/platform_utils.h
index 763a70e5..1e86f72e 100644
--- a/client/x11/platform_utils.h
+++ b/client/x11/platform_utils.h
@@ -18,11 +18,28 @@
#ifndef _H_PLATFORM_UTILS
#define _H_PLATFORM_UTILS
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netinet/tcp.h>
+#include <netdb.h>
+
#ifdef __i386__
-#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : : "memory")
+#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory")
#else
-#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : : "memory")
+#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%rsp)" : : : "memory")
#endif
+typedef int SOCKET;
+
+#define INVALID_SOCKET -1
+#define SOCKET_ERROR -1
+#define closesocket(sock) ::close(sock)
+#define SHUTDOWN_ERR EPIPE
+#define INTERRUPTED_ERR EINTR
+#define WOULDBLOCK_ERR EAGAIN
+#define sock_error() errno
+#define sock_err_message(err) strerror(err)
+
#endif