aboutsummaryrefslogtreecommitdiff
path: root/mctypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'mctypes.h')
-rw-r--r--mctypes.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mctypes.h b/mctypes.h
new file mode 100644
index 0000000..3fe4a7f
--- /dev/null
+++ b/mctypes.h
@@ -0,0 +1,18 @@
+#include <sys/types.h>
+typedef u_int8_t *varint;
+typedef u_int8_t *varlong;
+
+typedef struct {
+ varint length;
+ char *content;
+} string;
+
+typedef struct {
+ varint length;
+ varint id;
+ char *data;;
+} packet;
+
+
+int writeVarInt(varint x);
+varint writeVarInt(unsigned int x);