summaryrefslogtreecommitdiff
path: root/shared/mc-protocol.h
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-27 15:18:45 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-27 15:18:45 +0200
commit99b2c70137fef05a5a18f439b9010ddba455f5cb (patch)
treeb0c08cfce14019cd634e6b4b84d0cf0f6e8eee6a /shared/mc-protocol.h
parenta87e894ba3f3a8915389f651fb034f0d1835630c (diff)
Create a shared mc protocol implementation and use it in the proxy and cmd line tool
Diffstat (limited to 'shared/mc-protocol.h')
-rw-r--r--shared/mc-protocol.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/shared/mc-protocol.h b/shared/mc-protocol.h
new file mode 100644
index 0000000..8ecc02a
--- /dev/null
+++ b/shared/mc-protocol.h
@@ -0,0 +1,13 @@
+#ifndef foomcprotocolhfoo
+#define foomcprotocolhfoo
+
+int mc_is_handshake_complete(const char *buf, size_t len);
+
+bool mc_protocol_parse_status_reply(const char *buf, size_t len,
+ unsigned *online, unsigned *max);
+
+bool mc_protocol_create_status_request(char *buf, size_t len, size_t *rlen,
+ struct saddr *saddr);
+
+#endif
+