Added vlan_id in ndpi_flow2json() prototype
This commit is contained in:
@@ -1392,6 +1392,7 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
||||
{
|
||||
if (ndpi_flow2json(workflow->ndpi_struct, flow->ndpi_flow,
|
||||
flow->ip_version, flow->protocol,
|
||||
flow->vlan_id,
|
||||
flow->src_ip, flow->dst_ip,
|
||||
&flow->src_ip6, &flow->dst_ip6,
|
||||
flow->src_port, flow->dst_port,
|
||||
|
||||
@@ -1127,6 +1127,7 @@ extern "C" {
|
||||
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,
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user