X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d084d9ae9f7bcd7f7d1926e7eeae921dbad49273..80270bc96f3fd1d1f14b3ef539b73ad2eb0017de:/projects/stargazer/plugins/configuration/sgconfig2/proto.h?ds=sidebyside diff --git a/projects/stargazer/plugins/configuration/sgconfig2/proto.h b/projects/stargazer/plugins/configuration/sgconfig2/proto.h deleted file mode 100644 index 7dc4b50f..00000000 --- a/projects/stargazer/plugins/configuration/sgconfig2/proto.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef __PROTO_H__ -#define __PROTO_H__ - -namespace SGCONF2 { - -/* - * --- Protocol structure (binary part) --- - * - * Request: - * |---------------| - * |PROTOHEADER | - * |REQUESTHEADER | - * |---------------| - * | cryptodata | - * ~~~~~~~~~~~~~~~~~ - * |---------------| - * - * Response: - * |---------------| - * |PROTOHEADER | - * |RESPONSEHEADER | - * | error message | - * | cryptodata | - * ~~~~~~~~~~~~~~~~~ - * |---------------| - * - */ - - static char magic[8] = "STGCONF2"; - - enum RESPONSECODES { - E_OK = 0, // No error - E_NET_ERROR, // Network error (i.e. - timeout) - E_PROTO_ERROR, // Protocol error (invalid magic, unsupported version, etc.) - E_INVALID_LOGIN,// Invalid login - E_PERMISSIONS // Operation not permitted - }; - - struct PROTOHEADER { - char magic[8]; - uint32_t version; - }; - - struct REQUESTHEADER { - char login[32]; - }; - - struct CRYPTOHEADER { - char login[32]; - uint32_t dataSize; // Can't be 0 - }; - - struct RESPONSEHEADER { - uint32_t code; - uint32_t errorMessageSize; // May be 0 - uint32_t dataSize; // May be 0 - }; - -} - -#endif