summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2018-11-08 15:41:46 +0900
committerjaseg <git@jaseg.net>2018-11-08 15:41:46 +0900
commit050d49a56bc54c78c3fc1f4f125b09634d6c5b83 (patch)
tree281cee1a4b07a7cc1da1a0c1406877d9707e4df6 /include
parent8ee5f4ce6a70e742156c28565fb13ee96ae35a1f (diff)
downloadsecure-hid-050d49a56bc54c78c3fc1f4f125b09634d6c5b83.tar.gz
secure-hid-050d49a56bc54c78c3fc1f4f125b09634d6c5b83.tar.bz2
secure-hid-050d49a56bc54c78c3fc1f4f125b09634d6c5b83.zip
Noise integration compiles
Diffstat (limited to 'include')
-rw-r--r--include/cobs.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/cobs.h b/include/cobs.h
new file mode 100644
index 0000000..6c70c02
--- /dev/null
+++ b/include/cobs.h
@@ -0,0 +1,23 @@
+#ifndef __COBS_H__
+#define __COBS_H__
+
+#include <stdint.h>
+#include <unistd.h>
+#include <string.h>
+
+
+struct cobs_decode_state {
+ size_t p;
+ size_t c;
+};
+
+
+ssize_t cobs_encode(char *dst, size_t dstlen, char *src, size_t srclen);
+ssize_t cobs_decode(char *dst, size_t dstlen, char *src, size_t srclen);
+
+int cobs_encode_incremental(void *f, int (*output)(void *, char), char *src, size_t srclen);
+
+void cobs_decode_incremental_initialize(struct cobs_decode_state *state);
+int cobs_decode_incremental(struct cobs_decode_state *state, char *dst, size_t dstlen, char src);
+
+#endif//__COBS_H__