[Spice-commits] 5 commits - client/application.cpp client/gui client/Makefile.am client/windows client/x11 common/Makefile.am common/win configure.ac Makefile.am NEWS python_modules/Makefile.am server/Makefile.am server/reds.c server/red_tunnel_worker.c
Alexander Larsson
alexl at kemper.freedesktop.org
Thu Jul 8 13:45:00 PDT 2010
Makefile.am | 2 +
NEWS | 22 ++++++++++++++++++
client/Makefile.am | 15 ++++++++++--
client/application.cpp | 4 +++
client/gui/Makefile.am | 21 +++++++++++++++++
client/windows/Makefile.am | 39 +++++++++++++++++++++++++++++++++
client/windows/redc.vcproj | 8 ------
client/x11/Makefile.am | 16 +++++++++++--
common/Makefile.am | 16 ++++++-------
common/win/my_getopt-1.5/Makefile | 26 ----------------------
common/win/my_getopt-1.5/Makefile.test | 26 ++++++++++++++++++++++
configure.ac | 7 +++++
python_modules/Makefile.am | 2 -
server/Makefile.am | 1
server/red_tunnel_worker.c | 22 +++++++++---------
server/reds.c | 6 +++--
16 files changed, 171 insertions(+), 62 deletions(-)
New commits:
commit f11350e9f27f6fa8d83fa0006de7c560db145d4c
Author: Alexander Larsson <alexl at redhat.com>
Date: Thu Jul 8 20:43:35 2010 +0200
Update NEWS for release
diff --git a/NEWS b/NEWS
index e69de29..04c3dc4 100644
--- a/NEWS
+++ b/NEWS
@@ -0,0 +1,22 @@
+Major changes in 0.5.2:
+=======================
+
+This is the first release of the unstable 0.5.x series leading up to 0.6.
+With this release the API of spice-server is considered stable, but
+the network protocol and QXL PCI ABI are still unstable.
+
+The major changes compared to the 0.4 series are:
+
+* New, more efficient network protocol
+* Support for offscreen surfaces in guest driver
+* New spice-server API
+* A marshalling/demarshalling system that isolates the network
+ protocol parsing from the internal types
+* A PCI parsing and validation layer making it easier to
+ get backwards compatibility, cleaning up the internals ans
+ makes security review easier.
+* WAN support, including lossy compression using jpeg and
+ zlib compression.
+* Easier to build. No more dependencies on forked versions
+ of pixman and cairo. Separate module spice-protocol containing
+ headers used when building drivers and qemu.
commit 9d8a76fcd0a9e5b74684bfc966573081de434fae
Author: Alexander Larsson <alexl at redhat.com>
Date: Thu Jul 8 19:41:23 2010 +0200
Disable tunnel by default on windows
diff --git a/client/windows/redc.vcproj b/client/windows/redc.vcproj
index 6f630c2..6b5182c 100644
--- a/client/windows/redc.vcproj
+++ b/client/windows/redc.vcproj
@@ -442,10 +442,6 @@
>
</File>
<File
- RelativePath="..\tunnel_channel.cpp"
- >
- </File>
- <File
RelativePath="..\utils.cpp"
>
</File>
@@ -668,10 +664,6 @@
>
</File>
<File
- RelativePath="..\tunnel_channel.h"
- >
- </File>
- <File
RelativePath="..\utils.h"
>
</File>
commit 633e962ac35f0cb0281bba4b22b88ff78cd76d80
Author: Alexander Larsson <alexl at redhat.com>
Date: Thu Jul 8 19:35:48 2010 +0200
Make tunnel support optional in client too
diff --git a/client/application.cpp b/client/application.cpp
index 72db03f..af37ae0 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -40,7 +40,9 @@
#include "quic.h"
#include "mutex.h"
#include "cmd_line_parser.h"
+#ifdef USE_TUNNEL
#include "tunnel_channel.h"
+#endif
#include "rect.h"
#ifdef USE_GUI
#include "gui/gui.h"
@@ -1922,9 +1924,11 @@ void Application::register_channels()
_client.register_channel_factory(RecordChannel::Factory());
}
+#ifdef USE_TUNNEL
if (_enabled_channels[SPICE_CHANNEL_TUNNEL]) {
_client.register_channel_factory(TunnelChannel::Factory());
}
+#endif
}
bool Application::process_cmd_line(int argc, char** argv)
diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index dc83f58..101f6dd 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -109,8 +109,6 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/hot_keys.cpp \
$(CLIENT_DIR)/hot_keys.h \
$(CLIENT_DIR)/threads.cpp \
- $(CLIENT_DIR)/tunnel_channel.cpp \
- $(CLIENT_DIR)/tunnel_channel.h \
$(CLIENT_DIR)/utils.cpp \
$(CLIENT_DIR)/utils.h \
$(CLIENT_DIR)/zlib_decoder.cpp \
@@ -118,6 +116,15 @@ RED_COMMON_SRCS = \
$(CLIENT_DIR)/icon.h \
$(NULL)
+if SUPPORT_TUNNEL
+RED_TUNNEL_SRCS = \
+ $(CLIENT_DIR)/tunnel_channel.cpp \
+ $(CLIENT_DIR)/tunnel_channel.h \
+ $(NULL)
+else
+RED_TUNNEL_SRCS =
+endif
+
if SUPPORT_GUI
RED_GUI_SRCS = \
$(CLIENT_DIR)/gui/softrenderer.h \
@@ -127,7 +134,8 @@ RED_GUI_SRCS = \
$(CLIENT_DIR)/gui/resource_provider.h \
$(CLIENT_DIR)/gui/resource_provider.cpp \
$(CLIENT_DIR)/gui/gui.h \
- $(CLIENT_DIR)/gui/gui.cpp
+ $(CLIENT_DIR)/gui/gui.cpp \
+ $(NULL)
else
RED_GUI_SRCS =
endif
@@ -176,6 +184,7 @@ spicec_SOURCES = \
x_platform.h \
$(RED_COMMON_SRCS) \
$(RED_GUI_SRCS) \
+ $(RED_TUNNEL_SRCS) \
$(RED_OGL_SRCS) \
$(NULL)
diff --git a/configure.ac b/configure.ac
index 03529d0..8033252 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,6 +96,9 @@ AC_ARG_ENABLE(tunnel,
[ --enable-tunnel Enable network redirection],
[ have_tunnel=yes])
AM_CONDITIONAL(SUPPORT_TUNNEL, test "x$have_tunnel" = "xyes")
+if test "x$have_tunnel" = "xyes"; then
+ AC_DEFINE(USE_TUNNEL, [1], [Define if supporting tunnel proxying])
+fi
use_gui=no
AC_ARG_ENABLE(gui,
diff --git a/server/reds.c b/server/reds.c
index 1a227ae..df82f19 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -55,7 +55,7 @@
#include "demarshallers.h"
#include "marshaller.h"
#include "generated_marshallers.h"
-#ifdef HAVE_SLIRP
+#ifdef USE_TUNNEL
#include "red_tunnel_worker.h"
#endif
@@ -92,7 +92,9 @@ static pthread_mutex_t *lock_cs;
static long *lock_count;
uint32_t streaming_video = STREAM_VIDEO_FILTER;
spice_image_compression_t image_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
+#ifdef USE_TUNNEL
void *red_tunnel = NULL;
+#endif
int agent_mouse = TRUE;
static void openssl_init();
@@ -3456,7 +3458,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
attach_to_red_agent(SPICE_CONTAINEROF(sin, SpiceVDIPortInstance, base));
} else if (strcmp(interface->type, SPICE_INTERFACE_NET_WIRE) == 0) {
-#ifdef HAVE_SLIRP
+#ifdef USE_TUNNEL
SpiceNetWireInstance *net;
red_printf("SPICE_INTERFACE_NET_WIRE");
if (red_tunnel) {
commit ceff16cad6a9191d634b83b2914096e7564924e7
Author: Alexander Larsson <alexl at redhat.com>
Date: Thu Jul 8 19:22:39 2010 +0200
Make distcheck work
diff --git a/Makefile.am b/Makefile.am
index 0caf9fe..d90357f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,3 +7,5 @@ DISTCLEANFILES = \
spice-server.pc
EXTRA_DIST = spice.proto spice1.proto spice_codegen.py
+
+DISTCHECK_CONFIGURE_FLAGS=--enable-opengl --enable-gui --enable-tunnel
diff --git a/client/Makefile.am b/client/Makefile.am
index d5602b5..185518a 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -1,7 +1,7 @@
NULL =
-SUBDIRS = . $(red_target)
-DIST_SUBDIRS = x11 #windows
+SUBDIRS = . $(red_target) gui
+DIST_SUBDIRS = x11 windows gui
spice_built_sources = generated_demarshallers.cpp generated_marshallers.cpp generated_demarshallers1.cpp generated_marshallers1.cpp
@@ -81,10 +81,12 @@ RED_COMMON_SRCS = \
menu.h \
mjpeg_decoder.h \
mjpeg_decoder.cpp \
+ event_sources.h \
pixels_source.h \
platform.h \
playback_channel.cpp \
process_loop.cpp \
+ process_loop.h \
quic.cpp \
read_write_mutex.h \
record_channel.cpp \
@@ -119,8 +121,15 @@ RED_COMMON_SRCS = \
zlib_decoder.h \
$(NULL)
+GDI_FILES = \
+ gdi_canvas.cpp \
+ red_gdi_canvas.cpp \
+ red_gdi_canvas.h \
+ red_pixmap_gdi.h \
+ $(NULL)
+
MAINTAINERCLEANFILES = $(spice_built_sources)
-EXTRA_DIST = $(RED_COMMON_SRCS) $(spice_built_sources) $(GL_SRCS)
+EXTRA_DIST = $(RED_COMMON_SRCS) $(spice_built_sources) $(GL_SRCS) $(GDI_FILES)
BUILT_SOURCES = $(spice_built_sources)
diff --git a/client/gui/Makefile.am b/client/gui/Makefile.am
new file mode 100644
index 0000000..e1204c9
--- /dev/null
+++ b/client/gui/Makefile.am
@@ -0,0 +1,21 @@
+NULL =
+
+EXTRA_DIST = \
+ commonv2c.ttf.c \
+ commonwealth-10.font.c \
+ dejavu_sans-10.font.c \
+ dejavu_sans.ttf.c \
+ gui.cpp \
+ gui.h \
+ resource_provider.cpp \
+ resource_provider.h \
+ softrenderer.cpp \
+ softrenderer.h \
+ softtexture.cpp \
+ softtexture.h \
+ taharez_look.imageset.c \
+ taharez_look.looknfeel.c \
+ taharez_look.scheme.c \
+ taharez_look.tga.c \
+ $(NULL)
+
diff --git a/client/windows/Makefile.am b/client/windows/Makefile.am
new file mode 100644
index 0000000..a9babd6
--- /dev/null
+++ b/client/windows/Makefile.am
@@ -0,0 +1,39 @@
+NULL =
+
+EXTRA_DIST = \
+ atomic_count.h \
+ event_sources_p.cpp \
+ event_sources_p.h \
+ generate1.bat \
+ generate.bat \
+ main.cpp \
+ my_getopt.cpp \
+ named_pipe.cpp \
+ named_pipe.h \
+ pixels_source.cpp \
+ pixels_source_p.h \
+ platform.cpp \
+ platform_utils.cpp \
+ platform_utils.h \
+ playback.cpp \
+ playback.h \
+ record.cpp \
+ record.h \
+ redc.rc \
+ redc.sln \
+ redc.vcproj \
+ red_drawable.cpp \
+ red_pixmap.cpp \
+ red_pixmap_gdi.cpp \
+ red_pixmap_sw.cpp \
+ red_window.cpp \
+ red_window_p.h \
+ resource.h \
+ spicec.exe.manifest \
+ spice.ico \
+ static_title.bmp \
+ stdint.h \
+ sticky_alt.bmp \
+ win_platform.h \
+ $(NULL)
+
diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index ce4813b..dc83f58 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -150,6 +150,7 @@ bin_PROGRAMS = spicec
spicec_SOURCES = \
atomic_count.h \
event_sources_p.cpp \
+ event_sources_p.h \
main.cpp \
named_pipe.h \
named_pipe.cpp \
diff --git a/common/Makefile.am b/common/Makefile.am
index 5c1d6e0..407de1d 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,6 +1,8 @@
+SUBDIRS = win
+
NULL =
-COMMON_SRCS = \
+COMMON_SRCS = \
sw_canvas.h \
sw_canvas.c \
pixman_utils.h \
@@ -10,6 +12,8 @@ COMMON_SRCS = \
canvas_utils.h \
canvas_utils.c \
draw.h \
+ gdi_canvas.h \
+ gdi_canvas.c \
gl_canvas.h \
gl_canvas.c \
glc.h \
@@ -22,11 +26,7 @@ COMMON_SRCS = \
quic.h \
quic.c \
quic_config.h \
- qxl_dev.h \
rect.h \
- red_error_codes.h \
- red.h \
- reds_stat.h \
region.h \
region.c \
ring.h \
@@ -41,12 +41,12 @@ COMMON_SRCS = \
lz.h \
marshaller.h \
marshaller.c \
+ messages.h \
+ mem.h \
+ mem.c \
quic_family_tmpl.c \
quic_rgb_tmpl.c \
quic_tmpl.c \
- ipc_ring.h \
- vd_agent.h \
- quic_tmpl.c \
$(NULL)
EXTRA_DIST = $(COMMON_SRCS)
diff --git a/common/win/my_getopt-1.5/Makefile b/common/win/my_getopt-1.5/Makefile
deleted file mode 100644
index 083cc4a..0000000
--- a/common/win/my_getopt-1.5/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-all: copy
-
-# Compiler options
-#CCOPTS = -g -O3 -Wall -Werror
-CCOPTS =
-
-# Compiler
-CC = gcc -Wall -Werror
-#CC = cc
-
-# Linker
-LD = $(CC)
-
-# Utility to remove a file
-RM = rm
-
-OBJS = main.o my_getopt.o
-
-copy: $(OBJS)
- $(LD) -o $@ $(OBJS)
-
-clean:
- $(RM) -f copy $(OBJS) *~
-
-%.o: %.c getopt.h my_getopt.h
- $(CC) $(CCOPTS) -o $@ -c $<
diff --git a/common/win/my_getopt-1.5/Makefile.test b/common/win/my_getopt-1.5/Makefile.test
new file mode 100644
index 0000000..083cc4a
--- /dev/null
+++ b/common/win/my_getopt-1.5/Makefile.test
@@ -0,0 +1,26 @@
+all: copy
+
+# Compiler options
+#CCOPTS = -g -O3 -Wall -Werror
+CCOPTS =
+
+# Compiler
+CC = gcc -Wall -Werror
+#CC = cc
+
+# Linker
+LD = $(CC)
+
+# Utility to remove a file
+RM = rm
+
+OBJS = main.o my_getopt.o
+
+copy: $(OBJS)
+ $(LD) -o $@ $(OBJS)
+
+clean:
+ $(RM) -f copy $(OBJS) *~
+
+%.o: %.c getopt.h my_getopt.h
+ $(CC) $(CCOPTS) -o $@ -c $<
diff --git a/configure.ac b/configure.ac
index dc13caf..03529d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -350,11 +350,15 @@ AC_OUTPUT([
Makefile
spice-server.pc
common/Makefile
+common/win/Makefile
+common/win/my_getopt-1.5/Makefile
python_modules/Makefile
server/Makefile
client/Makefile
client/x11/Makefile
client/x11/images/Makefile
+client/gui/Makefile
+client/windows/Makefile
])
dnl ==========================================================================
diff --git a/python_modules/Makefile.am b/python_modules/Makefile.am
index 4b3c960..f304ec0 100644
--- a/python_modules/Makefile.am
+++ b/python_modules/Makefile.am
@@ -1,6 +1,6 @@
NULL =
-PYTHON_MODULES = __init__.py codegen.py demarshal.py ptypes.py spice_parser.py
+PYTHON_MODULES = __init__.py codegen.py demarshal.py marshal.py ptypes.py spice_parser.py
EXTRA_DIST = $(PYTHON_MODULES)
diff --git a/server/Makefile.am b/server/Makefile.am
index a12009c..debcd27 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -80,6 +80,7 @@ TUNNEL_SRCS =
endif
libspice_server_la_SOURCES = \
+ demarshallers.h \
glz_encoder.c \
glz_encoder_config.h \
glz_encoder_dictionary.c \
commit 0c505931dc5cb8edee36d6613cb70946df1ed430
Author: Alexander Larsson <alexl at redhat.com>
Date: Thu Jul 8 19:20:19 2010 +0200
Missed some misspelling fixes
diff --git a/server/red_tunnel_worker.c b/server/red_tunnel_worker.c
index e331a1a..fea4546 100644
--- a/server/red_tunnel_worker.c
+++ b/server/red_tunnel_worker.c
@@ -2345,7 +2345,7 @@ static void tunnel_channel_send_set_ack(TunnelChannel *channel, PipeItem *item)
red_channel_init_send_data(&channel->base, SPICE_MSG_SET_ACK, item);
red_channel_add_buf(&channel->base, &channel->base.send_data.u.ack, sizeof(SpiceMsgSetAck));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
}
static void tunnel_channel_send_migrate(TunnelChannel *channel, PipeItem *item)
@@ -2356,7 +2356,7 @@ static void tunnel_channel_send_migrate(TunnelChannel *channel, PipeItem *item)
channel->expect_migrate_mark = TRUE;
red_channel_init_send_data(&channel->base, SPICE_MSG_MIGRATE, item);
red_channel_add_buf(&channel->base, &channel->base.send_data.u.migrate, sizeof(SpiceMsgMigrate));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
}
static int __tunnel_channel_send_process_bufs_migrate_data(TunnelChannel *channel,
@@ -2536,7 +2536,7 @@ static void tunnel_channel_send_migrate_data(TunnelChannel *channel, PipeItem *i
data_buf_offset);
}
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
}
static void tunnel_channel_send_init(TunnelChannel *channel, PipeItem *item)
@@ -2549,7 +2549,7 @@ static void tunnel_channel_send_init(TunnelChannel *channel, PipeItem *item)
red_channel_init_send_data(&channel->base, SPICE_MSG_TUNNEL_INIT, item);
red_channel_add_buf(&channel->base, &channel->send_data.u.init, sizeof(SpiceMsgTunnelInit));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
}
static void tunnel_channel_send_service_ip_map(TunnelChannel *channel, PipeItem *item)
@@ -2563,7 +2563,7 @@ static void tunnel_channel_send_service_ip_map(TunnelChannel *channel, PipeItem
red_channel_add_buf(&channel->base, &channel->send_data.u.service_ip,
sizeof(SpiceMsgTunnelServiceIpMap));
red_channel_add_buf(&channel->base, &service->virt_ip.s_addr, sizeof(SpiceTunnelIPv4));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
}
static void tunnel_channel_send_socket_open(TunnelChannel *channel, PipeItem *item)
@@ -2581,7 +2581,7 @@ static void tunnel_channel_send_socket_open(TunnelChannel *channel, PipeItem *it
red_channel_add_buf(&channel->base, &channel->send_data.u.socket_open,
sizeof(channel->send_data.u.socket_open));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
#ifdef DEBUG_NETWORK
PRINT_SCKT(sckt);
#endif
@@ -2606,7 +2606,7 @@ static void tunnel_channel_send_socket_fin(TunnelChannel *channel, PipeItem *ite
red_channel_add_buf(&channel->base, &channel->send_data.u.socket_fin,
sizeof(channel->send_data.u.socket_fin));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
#ifdef DEBUG_NETWORK
PRINT_SCKT(sckt);
@@ -2638,7 +2638,7 @@ static void tunnel_channel_send_socket_close(TunnelChannel *channel, PipeItem *i
red_channel_add_buf(&channel->base, &channel->send_data.u.socket_close,
sizeof(channel->send_data.u.socket_close));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
#ifdef DEBUG_NETWORK
PRINT_SCKT(sckt);
@@ -2657,7 +2657,7 @@ static void tunnel_channel_send_socket_closed_ack(TunnelChannel *channel, PipeIt
red_channel_add_buf(&channel->base, &channel->send_data.u.socket_close_ack,
sizeof(channel->send_data.u.socket_close_ack));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
#ifdef DEBUG_NETWORK
PRINT_SCKT(sckt);
@@ -2694,7 +2694,7 @@ static void tunnel_channel_send_socket_token(TunnelChannel *channel, PipeItem *i
red_channel_add_buf(&channel->base, &channel->send_data.u.socket_token,
sizeof(channel->send_data.u.socket_token));
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
}
static void tunnel_channel_send_socket_out_data(TunnelChannel *channel, PipeItem *item)
@@ -2750,7 +2750,7 @@ static void tunnel_channel_send_socket_out_data(TunnelChannel *channel, PipeItem
sckt->out_data.num_tokens--;
- red_channel_begin_send_massage(&channel->base);
+ red_channel_begin_send_message(&channel->base);
}
static void tunnel_worker_release_socket_out_data(TunnelWorker *worker, PipeItem *item)
More information about the Spice-commits
mailing list