diff options
author | 2019-05-19 13:52:43 +0300 | |
---|---|---|
committer | 2019-05-19 13:52:43 +0300 | |
commit | b4165ee0b257aaa9064c5ac82200ff2569a02955 (patch) | |
tree | 5f56cb813bace9b885c0528b7b23342d4e625f6c /include/utils.h | |
parent | 9c8ece1538d31dba9a416c9f29f88e18510f4c75 (diff) | |
download | usurpation-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/utils.h')
-rw-r--r-- | include/utils.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/utils.h b/include/utils.h index ca2d2ee..daea864 100644 --- a/include/utils.h +++ b/include/utils.h @@ -1,6 +1,19 @@ -#ifdef PROJECT_UTILS_H +#ifndef PROJECT_UTILS_H #define PROJECT_UTILS_H +#include <stdint.h> + +typedef struct uuid_s { + uint64_t low; + uint64_t hi; +} uuid_t; + +int cmp_uuid(uuid_t *first, uuid_t *second); + +/* Prints uuid in cannonical format. + */ +void uuid_to_str(uuid_t *to_print, char *buf); + typedef int fpi1_t; fpi1_t add(fpi1_t a, fpi1_t b); |