summaryrefslogtreecommitdiff
path: root/netbytes.h
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2019-05-21 22:21:21 +0100
committerFreeArtMan <dos21h@gmail.com>2019-05-21 22:21:21 +0100
commita22163cbe74e267bbe307c39c815dbb781acc83a (patch)
tree66eab8f1c8d1f4f46aaa65e6d93b7458727bce2f /netbytes.h
parent385f3ef50cb142bb860281230394df7a9e6b34b5 (diff)
downloadnetbytes-a22163cbe74e267bbe307c39c815dbb781acc83a.tar.gz
netbytes-a22163cbe74e267bbe307c39c815dbb781acc83a.zip
Added buffer check functionHEADmaster
Diffstat (limited to 'netbytes.h')
-rw-r--r--netbytes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/netbytes.h b/netbytes.h
index 6e008bc..685b68a 100644
--- a/netbytes.h
+++ b/netbytes.h
@@ -1,6 +1,10 @@
#ifndef __NETBYTES_H
#define __NETBYTES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@@ -167,6 +171,8 @@ int nb_count( netbyte_store *store );
int nb_type( netbyte_store *store, int count, __NBT_TYPED **type );
int nb_val( netbyte_store *store, int count, __nb_type **type );
int nb_fread( netbyte_store *store, int fd);
+/*check if data may contain full netbyte buffer*/
+int nb_check_buf(uint8_t *data, int len, int *detected_size);
//print all all values in netbyte string
int nb_print(netbyte_store *store);
@@ -188,4 +194,8 @@ void nb_tok_destroy(nb_tok_arr *arr);
int nb_parse(char *str, nb_tok_arr *arr);
+#ifdef __cplusplus
+}
+#endif
+
#endif \ No newline at end of file