From 28b41ee492805971632e1d65ab9f855ce837767b Mon Sep 17 00:00:00 2001 From: Plex Date: Fri, 4 Feb 2022 19:16:30 +0100 Subject: Factored the usage() function --- mctypes.h | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 mctypes.h (limited to 'mctypes.h') diff --git a/mctypes.h b/mctypes.h deleted file mode 100644 index 9b2de0d..0000000 --- a/mctypes.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef MCTYPES_H -#define MCTYPES_H - -#include - - -typedef u_int8_t *varint; -typedef u_int8_t *varlong; - -typedef struct { - varint length; - char *content; -} string; - -typedef struct { - varint length; - varint id; - void *data; -} packet; - -typedef struct { - varint protocol_version; - string server_address; - unsigned short server_port; - varint next_state; -}__attribute__((packed)) handshake; - - -typedef long ping; -typedef long pong; - -int from_varint(varint x); -varint to_varint(unsigned int x); -size_t size_varint(varint x); - -size_t serialize_handshake(handshake hs, void **buf); -size_t serialize_packet(packet p, void **buf); - -varint deserialize_varint(void **raw); -string deserialize_string(void **raw); - -#endif // MCTYPES_H -- cgit v1.2.3