summaryrefslogtreecommitdiffstats
path: root/server/reds.c
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 /server/reds.c
parent308e4545cbf8d26d5d47ad6ab9f2c6e6e6648003 (diff)
downloadspice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.gz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.xz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.zip
tunnel
Diffstat (limited to 'server/reds.c')
-rw-r--r--server/reds.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c
index 067304d7..4630e958 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -47,6 +47,7 @@
#include "red_common.h"
#include "red_dispatcher.h"
#include "snd_worker.h"
+#include "red_tunnel_worker.h"
#include "reds_stat.h"
#include "stat.h"
#include "ring.h"
@@ -83,6 +84,7 @@ static pthread_mutex_t *lock_cs;
static long *lock_count;
uint32_t streaming_video = TRUE;
image_compression_t image_compression = IMAGE_COMPRESS_AUTO_GLZ;
+void *red_tunnel = NULL;
int agent_mouse = TRUE;
static void openssl_init();
@@ -3921,7 +3923,7 @@ int __attribute__ ((visibility ("default"))) spice_parse_args(const char *in_arg
// All SSL parameters should be either on or off.
if (ssl_port != ssl_key || ssl_key != ssl_certs || ssl_certs != ssl_cafile ||
- ssl_cafile != ssl_dhfile || ssl_dhfile != ssl_ciphersuite) {
+ ssl_cafile != ssl_dhfile || ssl_dhfile != ssl_ciphersuite) {
goto error;
}
@@ -4775,6 +4777,19 @@ static void interface_change_notifier(void *opaque, VDInterface *interface,
return;
}
attach_to_red_agent((VDIPortInterface *)interface);
+ } else if (strcmp(interface->type, VD_INTERFACE_NET_WIRE) == 0) {
+ NetWireInterface * net_wire = (NetWireInterface *)interface;
+ red_printf("VD_INTERFACE_NET_WIRE");
+ if (red_tunnel) {
+ red_printf("net wire already attached");
+ return;
+ }
+ if (interface->major_version != VD_INTERFACE_NET_WIRE_MAJOR ||
+ interface->minor_version < VD_INTERFACE_NET_WIRE_MINOR) {
+ red_printf("unsuported net wire interface");
+ return;
+ }
+ red_tunnel = red_tunnel_attach(core, net_wire);
}
break;
case VD_INTERFACE_REMOVING: