2 .TH "BUXTON\-PROTOCOL" "7" "" "buxton 1" "buxton\-protocol"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
17 .\" disable justification (adjust text to left margin only)
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
23 buxton\-protocol \- The wire protocol for buxton
27 A buxton client communicates with the buxton daemon
28 (\fBbuxtond\fR(8)) through a Unix Domain Socket by sending
29 messages over this socket that adhere to a specific format\&. Also,
30 \fBbuxtond\fR(8) may send a response back to the client in a same
31 format\&. The required rules, formats, and values permitted in this
32 two-way communication channel is hereafter called the "wire
35 .SH "PROTOCOL SPECIFICATION"
37 The following sections detail the specifics of the wire protocol\&.
41 The messages sent to \fBbuxtond\fR(8) from a client, or vice
42 versa, adhere to the following format:
48 The magic byte string has hex value 0x672\&.
51 Control code (2 bytes)
53 All control codes belong to an enum with 13 elements\&. Each code is
54 cast to a uint16_t value when serialized\&.
56 For client messages, the accepted control codes are:
57 BUXTON_CONTROL_SET, BUXTON_CONTROL_SET_LABEL,
58 BUXTON_CONTROL_CREATE_GROUP, BUXTON_CONTROL_REMOVE_GROUP,
59 BUXTON_CONTROL_GET, BUXTON_CONTROL_UNSET, BUXTON_CONTROL_NOTIFY, and
60 BUXTON_CONTROL_UNNOTIFY\&.
62 For daemon responses, accepted control codes are:
63 BUXTON_CONTROL_STATUS and BUXTON_CONTROL_CHANGED\&.
67 Message size (4 bytes)
69 The size on the entire message, with type uint32_t\&.
74 The unique ID for this message, with type uint32_t\&.
77 Parameter count (4 bytes)
79 The number of parameters in the message body, with contents as
80 described in the next section\&. This number has type uint32_t\&.
85 The message body contains one or more parameters, each with the
90 All recognized data types belong to an enum with 8 elements\&. Each
91 type is cast to a uint16_t value when serialized\&.
93 Accepted types include STRING, INT32, UINT32, INT64, UINT64, FLOAT,
94 DOUBLE, and BOOLEAN\&.
100 The length the data value, as defined in the next entry\&.
103 Data value (varies depending on data type)
105 For data with STRING type, the value may range from 0 (zero) bytes to
106 an arbitrary maximum, as permitted by the maximum message length and
107 factoring in the overall payload of the message\&. For all other data
108 types, the value size depends on the data type, with maximum size of
114 The maximum message length is 32KB (32768 bytes)\&.
116 The message byte order is dependent on the endianness of the host
121 Copyright 2014 Intel Corporation\&. License: Creative Commons
122 Attribution\-ShareAlike 3.0 Unported\s-2\u[1]\d\s+2\&.
133 Creative Commons Attribution\-ShareAlike 3.0 Unported
135 \%http://creativecommons.org/licenses/by-sa/3.0/