Hi there,
While I was converting command handlers to the QObject style I realized that
it would be very interesting to have the protocol working up front, so that
converted handlers could be tested to assure that their data types have been
chosen correctly.
More importantly, some protocol design decisions can affect handlers signatures,
so having at least an idea of how the protocol will look like will help us to
stay on the right track during mass conversion.
So, I have implemented a rudimentary version of the QEMU Monitor Protocol (QMP)
it has a command-line switch to enable the protocol.
You will find it at:
http://repo.or.cz/w/qemu/qmp-unstable.git
"""
QEMU Monitor Protocol Draft Specification - Version 0.1
1. Introduction
===============
This document specifies the QEMU Monitor Protocol (QMP), a JSON-based protocol
which is available for applications to control QEMU at the machine-level.
To enable QMP support, QEMU has to be run in "control mode". This is done by
starting QEMU with the appropriate command-line options. Please, refer to the
QEMU manual page for more information.
This specification is a work in progress and part of it may NOT be available
in QEMU, the 'Current Implementation' section has details regarding what has
already been implemented and known problems.
2. Protocol Specification
=========================
This section details the protocol format. For the purpose of this document
"Client" is any application which is communicating with QEMU in control mode,
and "Server" is QEMU itself.
JSON data structures, when mentioned in this document, are always in the
following format:
json-DATA-STRUCTURE-NAME
Where DATA-STRUCTURE-NAME is any valid JSON data structure, as defined by
the JSON standard:
http://www.ietf.org/rfc/rfc4627.txt
For convenience, json-objects mentioned in this document will have its members
in a certain order. However, in real protocol usage json-objects members can
be in ANY order, thus no particular order should be assumed.
2.1 General Definitions
-----------------------
All interactions transmitted by Client and Server are json-objects that end
with CRLF.