diff options
author | 2019-05-26 14:55:36 +0300 | |
---|---|---|
committer | 2019-05-26 14:55:36 +0300 | |
commit | 03d020c10113db431efeb6ae0d3380b2553387ac (patch) | |
tree | 6dc073fa8ecdb015b0cd3a7ab92b9b66001bdd89 /include/utils.h | |
parent | cce1aad04a2ce4ea0447ec8f3f4c41a8936d4a1a (diff) | |
parent | b25865cc827f4a6a9c31f3d92a4e443485fd5d93 (diff) | |
download | usurpation-03d020c10113db431efeb6ae0d3380b2553387ac.tar.gz usurpation-03d020c10113db431efeb6ae0d3380b2553387ac.tar.bz2 usurpation-03d020c10113db431efeb6ae0d3380b2553387ac.zip |
Merge branch '31-Net-Protocol-Handling'
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'include/utils.h')
-rw-r--r-- | include/utils.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/utils.h b/include/utils.h new file mode 100644 index 0000000..95b553d --- /dev/null +++ b/include/utils.h @@ -0,0 +1,22 @@ +#ifndef USURPATION_UTILS_H +#define USURPATION_UTILS_H + +#include <stdint.h> + +typedef struct uuid_s { + char bytes[16]; +} uuid_t; + +int cmp_uuid(uuid_t *first, uuid_t *second); + +/** + * Fixed point number with one decimal digit of precision. + */ +typedef int fpi1_t; + +fpi1_t fpi1_add(fpi1_t a, fpi1_t b); +fpi1_t fpi1_sub(fpi1_t a, fpi1_t b); +fpi1_t fpi1_mul(fpi1_t a, fpi1_t b); +fpi1_t fpi1_div(fpi1_t a, fpi1_t b); + +#endif /* USURPATION_UTILS_H */ |