Add ndpi_serialize_start_of_list/ndpi_serialize_end_of_list to serialize simple lists in JSON

This commit is contained in:
Alfredo Cardigliano
2020-05-25 16:37:00 +02:00
parent 8fa5c31996
commit 2dce6cd525
4 changed files with 323 additions and 118 deletions
+3
View File
@@ -973,6 +973,9 @@ extern "C" {
int ndpi_serialize_raw_record(ndpi_serializer *_serializer,
u_char *record, u_int32_t record_len);
int ndpi_serialize_end_of_record(ndpi_serializer *serializer);
int ndpi_serialize_start_of_list(ndpi_serializer *serializer,
const char *key);
int ndpi_serialize_end_of_list(ndpi_serializer *serializer);
int ndpi_serialize_start_of_block(ndpi_serializer *serializer,
const char *key);
int ndpi_serialize_end_of_block(ndpi_serializer *serializer);
+2
View File
@@ -1438,6 +1438,8 @@ typedef enum {
#define NDPI_SERIALIZER_STATUS_EOR (1 << 2)
#define NDPI_SERIALIZER_STATUS_SOB (1 << 3)
#define NDPI_SERIALIZER_STATUS_NOT_EMPTY (1 << 4)
#define NDPI_SERIALIZER_STATUS_LIST (1 << 5)
#define NDPI_SERIALIZER_STATUS_SOL (1 << 6)
typedef struct {
u_int32_t flags;