New serializer APIs ndpi_serialize_start_of_block / ndpi_serialize_end_of_block (JSON only)

This commit is contained in:
Alfredo Cardigliano
2019-09-25 17:19:33 +02:00
parent 0b62c0ad45
commit 3709e673d9
3 changed files with 66 additions and 1 deletions
+3
View File
@@ -858,6 +858,9 @@ extern "C" {
const char *key, float value,
const char *format /* e.f. "%.2f" */);
int ndpi_serialize_end_of_record(ndpi_serializer *serializer);
int ndpi_serialize_start_of_block(ndpi_serializer *_serializer,
const char *key);
int ndpi_serialize_end_of_block(ndpi_serializer *_serializer);
char* ndpi_serializer_get_buffer(ndpi_serializer *_serializer, u_int32_t *buffer_len);
u_int32_t ndpi_serializer_get_buffer_len(ndpi_serializer *_serializer);
int ndpi_serializer_set_buffer_len(ndpi_serializer *_serializer, u_int32_t l);
+1
View File
@@ -1365,6 +1365,7 @@ typedef enum {
#define NDPI_SERIALIZER_STATUS_COMMA (1 << 0)
#define NDPI_SERIALIZER_STATUS_ARRAY (1 << 1)
#define NDPI_SERIALIZER_STATUS_EOR (1 << 2)
#define NDPI_SERIALIZER_STATUS_SOB (1 << 3)
typedef struct {
u_int32_t flags;