diff options
author | 2019-06-07 17:13:13 +0300 | |
---|---|---|
committer | 2019-06-07 17:13:13 +0300 | |
commit | 30513e7a89cc2f9283458100dea298770c7d18de (patch) | |
tree | 244ce464f2f8a363418c4e9f256f7958f771a979 /include/utils.h | |
parent | 75c92f6776a69c1dddee3ee63af5d59e89184828 (diff) | |
download | usurpation-30513e7a89cc2f9283458100dea298770c7d18de.tar.gz usurpation-30513e7a89cc2f9283458100dea298770c7d18de.tar.bz2 usurpation-30513e7a89cc2f9283458100dea298770c7d18de.zip |
refactor server/client discovery to use TLVs.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'include/utils.h')
-rw-r--r-- | include/utils.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/utils.h b/include/utils.h index ba726ec..e1364c5 100644 --- a/include/utils.h +++ b/include/utils.h @@ -2,6 +2,7 @@ * Usurpation – utility functions. * * Copyright (C) 2019 Ramūnas Mažeikis + * Copyright (C) 2019 Gediminas Jakutis * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,8 +24,22 @@ #include <stdint.h> +#define MTU 1500 + +static const char heartbeat_device[] = "hey, hey!"; +static const char heartbeat_server[] = "cover this area."; + +/* standard status responses */ +enum response { + ERROR = -1, + A_OK = 0, /* would be "OK", but clashes with some lib definitions */ + NONEWDATA, + DEAD, + EMPTY, +}; + typedef struct uuid_s { - char bytes[16]; + char bytes[16]; } uuid_t; int cmp_uuid(uuid_t *first, uuid_t *second); |