diff options
| author | Jesper Jensen <jesper@slashwin.dk> | 2021-09-03 22:32:42 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@slashwin.dk> | 2021-09-03 22:32:42 +0200 |
| commit | 9b4973e7d96a3605583c3f9a80567945c8d4be71 (patch) | |
| tree | 3f17876a557a15ffe2a90591e157d1065a444a11 /src/benc.h | |
| parent | 5471d80c5350f764ec53733bae9d32c0a1a339e0 (diff) | |
Add ping support
Diffstat (limited to 'src/benc.h')
| -rw-r--r-- | src/benc.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 { |
