summaryrefslogtreecommitdiffstats
path: root/include/protocol.h
diff options
context:
space:
mode:
authorGravatar Ramūnas Mažeikis <ramunasnezinomas@gmail.com> 2019-05-19 13:52:43 +0300
committerGravatar Ramūnas Mažeikis <ramunasnezinomas@gmail.com> 2019-05-19 13:52:43 +0300
commitb4165ee0b257aaa9064c5ac82200ff2569a02955 (patch)
tree5f56cb813bace9b885c0528b7b23342d4e625f6c /include/protocol.h
parent9c8ece1538d31dba9a416c9f29f88e18510f4c75 (diff)
downloadusurpation-b4165ee0b257aaa9064c5ac82200ff2569a02955.tar.gz
usurpation-b4165ee0b257aaa9064c5ac82200ff2569a02955.tar.bz2
usurpation-b4165ee0b257aaa9064c5ac82200ff2569a02955.zip
Protocol: more work on protocol implementation.
Additional functions implemented for protocol and basic functions to work with uuid. Source is buildable but actual build files are not edited to accomodate the changes. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
Diffstat (limited to 'include/protocol.h')
-rw-r--r--include/protocol.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/protocol.h b/include/protocol.h
index c1b786c..5872fa3 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#ifdef PROTOCOL_H_INCLUDED
+#ifndef PROTOCOL_H_INCLUDED
#define PROTOCOL_H_INCLUDED
#include <errno.h>
@@ -33,11 +33,28 @@ enum packet_type {
};
enum tlv_type {
- TEXT, /* NULL-terminated string. */
- FPI1, /* Fixed point. 1 decimal digit of precision. */
+ /* NULL-terminated string. */
+ TEXT,
+
+ /* Fixed point. 1 decimal digit of precision. */
+ FPI1,
+
+ /* Literally time_t*/
TIMESTAMP,
+
+ /* Represents a request for lost message. Data is unsigned integer
+ * that uniquely identifies the message.
+ */
REQUEST,
+
+ /* Response to request. Begins with unsigned integer that represents
+ * which message is begin repeated and the actual null-terminated
+ * message after that.
+ */
REPLY,
+
+ /* UUID that represents a particular device.
+ */
UUID
};