Skip to content
Snippets Groups Projects
Commit f3448a3c authored by Guido Trotter's avatar Guido Trotter
Browse files

Fix confd procotol design description


The protocol design for confd was missing a description of the fourcc
code which we use to distinguish between different message types, if we
want to completely change the protocol. Adding them so that someone
implementing it can find out.

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 18337ca9
No related branches found
No related tags found
No related merge requests found
......@@ -361,7 +361,7 @@ Wire protocol
A confd query will look like this, on the wire::
{
plj0{
"msg": "{\"type\": 1,
\"rsalt\": \"9aa6ce92-8336-11de-af38-001d093e835f\",
\"protocol\": 1,
......@@ -370,7 +370,10 @@ A confd query will look like this, on the wire::
"hmac": "4a4139b2c3c5921f7e439469a0a45ad200aead0f"
}
Detailed explanation of the various fields:
"plj0" is a fourcc that details the message content. It stands for plain
json 0, and can be changed as we move on to different type of protocols
(for example protocol buffers, or encrypted json). What follows is a
json encoded string, with the following fields:
- 'msg' contains a JSON-encoded query, its fields are:
......@@ -392,7 +395,7 @@ Detailed explanation of the various fields:
If an answer comes back (which is optional, since confd works over UDP)
it will be in this format::
{
plj0{
"msg": "{\"status\": 0,
\"answer\": 0,
\"serial\": 42,
......@@ -403,6 +406,7 @@ it will be in this format::
Where:
- 'plj0' the message type magic fourcc, as discussed above
- 'msg' contains a JSON-encoded answer, its fields are:
- 'protocol', integer, is the confd protocol version (initially just
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment