From f78b26fdd889ee687061bb9adf7633954ad90d51 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Tue, 13 Jun 2023 23:56:17 -0500 Subject: client: add a reference client Add a reference client that will act as an example of what the client program should accomplish given a command from the C&C server. Signed-off-by: Danny Holman --- client/include/util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 client/include/util.h (limited to 'client/include') diff --git a/client/include/util.h b/client/include/util.h new file mode 100644 index 0000000..39c130b --- /dev/null +++ b/client/include/util.h @@ -0,0 +1,13 @@ +#ifndef MRAT_UTIL_H +#define MRAT_UTIL_H + +#include + +#define container_of(ptr, type, member) ({ \ + const typeof(((type*)0)->member)*__mptr = (ptr); \ + (type*)((char*)__mptr - offsetof(type, member)); }) + +char* str_strip(char *str); +char** str_split(char *str, const char *delim); + +#endif -- cgit v1.2.3