[Spice-devel] [PATCH spice-protocol] Add agent information message

Marc-André Lureau mlureau at redhat.com
Thu Oct 23 12:45:38 PDT 2014


Hi

----- Original Message -----
> Message will be used by client for requesting an information about
> a version of the agent running on the guest side.

Assuming the information is cheap to compute and send, and will be (almost) always queried, why not send it at beginning of session, when the client has a special cap set? 

Regarding the protocol change, I would rather not introduce the sub-"type" field in a message, and instead rely on existing message type. This is what I'd propose:

- client: set AGENT_CAP_GUEST_VERSION
- agent: send a  VDAgentGuestVersion when cap is set (define it as utf8 string)

Tbh, I worry about the usefulness of this feature. You may as well be interested about the version of other components in the guest. And to query that, you have better tools in the guest (and other agents/tools/daemons export that information). I am not quite sure what the spice client could do with this information but just expose it to the user, and then?...

Please clarify and provide a bug with the description of the issue.

thanks!

> ---
> The intention is to show this information in virt-viewer
> ---
>  spice/vd_agent.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/spice/vd_agent.h b/spice/vd_agent.h
> index 7464661..ef37e9e 100644
> --- a/spice/vd_agent.h
> +++ b/spice/vd_agent.h
> @@ -77,6 +77,7 @@ enum {
>      VD_AGENT_FILE_XFER_DATA,
>      VD_AGENT_CLIENT_DISCONNECTED,
>      VD_AGENT_MAX_CLIPBOARD,
> +    VD_AGENT_INFORMATION,
>      VD_AGENT_END_MESSAGE,
>  };
>  
> @@ -245,6 +246,15 @@ typedef struct SPICE_ATTR_PACKED
> VDAgentAnnounceCapabilities {
>  #define VD_AGENT_SET_CAPABILITY(caps, index) \
>      { (caps)[(index) / 32] |= (1 << ((index) % 32)); }
>  
> +typedef struct SPICE_ATTR_PACKED VDAgentInformation {
> +    uint32_t type;
> +    uint32_t data[0];
> +} VDAgentInformation;
> +
> +enum {
> +    VD_AGENT_INFORMATION_VERSION,
> +};
> +
>  #include <spice/end-packed.h>
>  
>  #endif /* _H_VD_AGENT */
> --
> 1.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list