From 30513e7a89cc2f9283458100dea298770c7d18de Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Fri, 7 Jun 2019 17:13:13 +0300 Subject: refactor server/client discovery to use TLVs. Signed-off-by: Gediminas Jakutis --- include/utils.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'include/utils.h') 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 +#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); -- cgit v1.2.3