[Spice-devel] Spice Protocol Missing Headers

Christophe Fergeau cfergeau at redhat.com
Thu Oct 12 13:33:40 UTC 2017


Hey,

On Wed, Oct 11, 2017 at 02:33:00AM +1100, geoff at hostfission.com wrote:
> I just spent the last hour searching for the header that contains "RedInit"
> according to the Spice protocol specification, frustratingly not finding it.
> 
> After digging through the client source I finally discovered it wasn't
> renamed to "SpiceInit", but to "SpiceMsgMainInit". Seems the Spice protocol
> documentation needs quite a bit of TLC.

Yeah, the spice protocol documentation is quite outdated at this point,
the newer messages introduced in the last years would not figure in it
either.

> Anyway, this is more about the missing headers in the spice-protocol
> project. The header in question is 'spice-common/common/messages.h' Since
> distributions such as Debian are distributing a dev package for the protocol
> package, on these platforms the header is missing. It seems that it has
> ended up in the wrong place as it is clearly a requirement for developing
> any clients that interact with the protocol directly. I can work around this
> by grabbing a copy of spice-common but this seems more of a work around
> rather then a fix for the problem.
> 
> Is anyone able to provide any insight on this?

Hmm I would say this is mostly for historical reasons, as far as I
remember you are the first one to raise this.

spice-common also contains spice.proto/spice1.proto files which are a
description of the spice-protocol, and which are used to generate some
files to marshall/unmarshall spice protocol data. spice-common also
contains the python scripts generating this marshalling/unmarshalling
code. In my opinion, messages.h should be generated from these .proto
files as well.

I tried a few years back (spice-protocol 0.12.10) to move these code
generation scripts to spice-protocol, but this did not work out
nicely so this was reverted.

I agree that having the initial link messages in spice/protocol.h, but
not the rest of the protocol in spice-protocol is unexpected. For now, I
would suggest that you copy this messages.h file as you suggested, even
if that's suboptimal. I don't expect that file to change that often.

Can you give more details about the project you are working on?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20171012/a7f3c77a/attachment.sig>


More information about the Spice-devel mailing list