summaryrefslogtreecommitdiff
path: root/src/benc.h
diff options
context:
space:
mode:
authorJesper Jensen <jesper@slashwin.dk>2021-09-03 22:32:42 +0200
committerJesper Jensen <jesper@slashwin.dk>2021-09-03 22:32:42 +0200
commit9b4973e7d96a3605583c3f9a80567945c8d4be71 (patch)
tree3f17876a557a15ffe2a90591e157d1065a444a11 /src/benc.h
parent5471d80c5350f764ec53733bae9d32c0a1a339e0 (diff)
Add ping support
Diffstat (limited to 'src/benc.h')
-rw-r--r--src/benc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/benc.h b/src/benc.h
index be06d5e..e3ca026 100644
--- a/src/benc.h
+++ b/src/benc.h
@@ -5,6 +5,8 @@
#include <stdbool.h>
#include <unistd.h>
+#define BENC_EBADP 1
+
enum benc_nodetype {
BNT_INT,
BNT_STRING,
@@ -24,7 +26,7 @@ struct benc_node {
bool readint(const char** loc, int64_t* val);
-void benc_print(const struct benc_node* stream, size_t stream_len, int* depth);
+void benc_print(const struct benc_node* stream, size_t stream_len);
int64_t benc_decode(const char** cursor, const char* end, int* depth, struct benc_node* stream, size_t stream_len);
struct bcursor {