diff options
author | 2019-05-20 21:50:19 +0300 | |
---|---|---|
committer | 2019-05-20 21:50:19 +0300 | |
commit | bb70fccb66f55e9cc2b9ed0bf366479828f41346 (patch) | |
tree | d87cd7b469a912c1a4be293add4b1e765842e4f6 /include/protocol.h | |
parent | 031caaf9b7745bfc552cc86fb475de1f18d0fd6d (diff) | |
download | usurpation-bb70fccb66f55e9cc2b9ed0bf366479828f41346.tar.gz usurpation-bb70fccb66f55e9cc2b9ed0bf366479828f41346.tar.bz2 usurpation-bb70fccb66f55e9cc2b9ed0bf366479828f41346.zip |
Protocol: implemented request and reply pushing to packet.
First implementation of complete protocol interface. While the
first implementation does compile, the interface might change
due to demands from other parts of the project.
For now reqest is a tlv that is an unsigned int which represents
what message to repeat from daemon.
A reply is also a tlv made of two parts --- message sequence
number of type msg_ixd_t and the actual null terminated string.
All of the above is subject to change.
More docs. Doxygen is on the way.
Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
Diffstat (limited to 'include/protocol.h')
-rw-r--r-- | include/protocol.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/protocol.h b/include/protocol.h index 9d5b518..ac83154 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -32,6 +32,13 @@ enum packet_type { DISCOVERY }; +/** + * Message sequence number since beggining of sesssion. + * + * Mainly used for identifying lost messages. + */ +typedef unsigned int msg_idx_t; + enum tlv_type { /** NULL-terminated string. */ TEXT, |