aboutsummaryrefslogtreecommitdiff
path: root/shared/bin.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-13 20:37:23 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-13 20:37:23 +0200
commit78f8f18e48d25547e837630d8317ef029bba6d72 (patch)
tree8e6055aeec0b27733ff53804d13c98ed4e61dafd /shared/bin.c
parent385b47211ea8674f97f014537d694bb2efbd6ab9 (diff)
more protocol parsing done
Diffstat (limited to 'shared/bin.c')
-rw-r--r--shared/bin.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/bin.c b/shared/bin.c
new file mode 100644
index 0000000..def2aa8
--- /dev/null
+++ b/shared/bin.c
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+#include <stdint.h>
+#include <memory.h>
+
+#include "bin.h"
+
+ws_s_bin *ws_bin_s_alloc(uint16_t bytes) {
+ ws_s_bin *temp = malloc(sizeof(ws_s_bin) + sizeof(uint8_t) * bytes);
+ temp->bytes = bytes;
+ return temp;
+}