Uppercase + prefix to make Gitlab happy and format it properly.
This should also be the case for all other spice components in Gitlab.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Added 193c54c in 2010-02-04 by Alexander Larsson <alexl@redhat.com>
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Following patches will rename NEWS to CHANGELOG.md due Gitlab
integration and remove the currently empty ChangeLog.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
The SpiceStat structure can be 20 or 24 bytes depending on alignment.
Being a memory mapped structure potentially used with lockless access,
it is not good to have it unaligned.
The only tool that we know of that reads this memory mapped file
(reds_stats) is able to detect if the structure is either 20 or 24
bytes and act accordingly so changing this structure won't affect the
behaviour (unless you have an old tool but as they are usually
packaged together this is quite improbable).
This will also help on Windows as in that system it is not possible
for reds_stats to implement the same discovery trick implemented on
Linux. On Windows it is not possible to read the size of the file
mapping (on Windows to implement shared memory you can use a file
mapping not associated to a file).
The structure will change layout only on 32-bit architectures which is
not recommended nowadays (the 64-bit platforms that we support align
64-bit integers to 64 bits).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
The message contains information about the graphics device and monitor
belonging to a particular video stream (which maps to a channel) from
the streaming agent.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
The message serves for passing the device address and device display ID
information for all display channels from SPICE server to the vd_agent.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This file was used by the old client to hold return error codes.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
This is required in the case another project uses this one as a subproject
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This avoids compilers detect misaligned access which can lead to
warnings.
In QEMU the structure is allocated at the beginning of a 4Kb page,
in Xspice is allocated with a calloc, so the structure will end up 4
bytes aligned as well with these users. We are not aware of other users
of QXLRam, but if there was, it's likely the struct would be at least
naturally aligned, so this change should not impact anyone.
Aligning to 4 bytes maintains the size of the structure unchanged
avoiding possible ABI changes.
clang currently generates an invalid function call if a misaligned
4 byte atomic operation is detected.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1565766
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This was done for configure.ac earlier, but is missing in meson.build
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
According to C standard the size of a structure without fields is
not defined (see
https://stackoverflow.com/questions/21851930/size-of-empty-structure-in-c-and-c).
As we almost only use GCC currently these structures are of size 0.
This can became a problem if 2 sides talking a given protocol use
these structures.
To avoid such possible mismatch (for instance having one side C and
the other C++ which defines these structures as having 1 as size) add
an empty (0-size array) field.
Although a 0-size array is not considered also that portable we use
extensively this feature with different compilers never encountering
issues.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
This definition is lacking in client while in server it is hardcoded
to 50. Having a well defined limitation allow us to make the code
more robust and optimized.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
It is a duplicate information in a place where it is not necessary and
of little value.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Depending on how structures are initialised in the code is
possible that implicit padding bytes are not initialised
causing possible information leaks as the entire structure
with all padding is sent through device/network.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
GCC introduced __builtin_bswapXX intrinsics in a quite old
version.
As version 2 and 3 are no more used nowadays instead of manually
craft these functions using assembly language use the new built-ins.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This flag will allow the client to perform some optimisations
on output and buffering processing.
Old clients will ignore this additional flag.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Clarify that this value specifies the size in bytes, not the number of
capabilities.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This message is specified to have a size limit of 1024, so provide this
as a #define
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
This allows to better support client mouse using streaming device
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
This protocol allows a guest to send a video stream to the server.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
Introduce new error statuses to report more info to clients:
VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED,
VD_AGENT_FILE_XFER_STATUS_VDAGENT_NOT_CONNECTED,
VD_AGENT_FILE_XFER_STATUS_DISABLED
These are only sent to clients that feature
VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS capability.
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Agent can send VDAgentFileXferStatusMessage with result
VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE to indicate lack of free
space. This enables more detailed error reporting, so the user knows
why the file transfer has failed.
Add VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS to ensure detailed errors
are not sent to clients that do not support it. This can be used
with more file xfer errors in the future.
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This allows the header to be used in no GPL programs.
Others headers are already MIT licensed so this change do
not require additional changes to already existing
programs.
The file can be generated with
./spice_codegen.py -e spice.proto --license MIT enums.h
from spice-common.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Client might want to choose a preferred video codec for streaming for
different reasons which having hardware decoder support being the most
interest one.
This message allows the client to send a list of video codecs in a
order of preference.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This gains us automatic support for whichever compilers GLib supports in
this macro when used in projects that use GLib.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>