aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_utils.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-06-09 19:50:47 +0200
committerLuca Deri <deri@ntop.org>2023-06-09 19:50:47 +0200
commit63a2b359b9bbc481ef266407791f09fd12be8fc4 (patch)
tree9c6e7a55d04bcd6b3eae731df1b9f2888180dedc /src/lib/ndpi_utils.c
parent7150b40c63e7393cddd94d40a2a4d0dd70f80cbc (diff)
Added vlan_id in ndpi_flow2json() prototype
Diffstat (limited to 'src/lib/ndpi_utils.c')
-rw-r--r--src/lib/ndpi_utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index 0199d6424..10328380c 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -1589,6 +1589,7 @@ int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int8_t ip_version,
u_int8_t l4_protocol,
+ u_int16_t vlan_id,
u_int32_t src_v4, u_int32_t dst_v4,
struct ndpi_in6_addr *src_v6, struct ndpi_in6_addr *dst_v6,
u_int16_t src_port, u_int16_t dst_port,
@@ -1607,6 +1608,7 @@ int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_patchIPv6Address(src_name), ndpi_patchIPv6Address(dst_name);
}
+ if(vlan_id != 0) ndpi_serialize_string_uint32(serializer, "vlan_id", vlan_id);
ndpi_serialize_string_string(serializer, "src_ip", src_name);
ndpi_serialize_string_string(serializer, "dest_ip", dst_name);
if(src_port) ndpi_serialize_string_uint32(serializer, "src_port", ntohs(src_port));