Add Softether dissector. (#1679)

Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
Toni
2022-07-29 19:29:54 +02:00
committed by GitHub
parent 405a52ed65
commit ed4f106a0d
58 changed files with 514 additions and 72 deletions
+26
View File
@@ -1462,6 +1462,25 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
}
break;
case INFO_SOFTETHER:
if (flow->softether.ip[0] != '\0')
{
fprintf(out, "[Client IP: %s]", flow->softether.ip);
}
if (flow->softether.port[0] != '\0')
{
fprintf(out, "[Client Port: %s]", flow->softether.port);
}
if (flow->softether.hostname[0] != '\0')
{
fprintf(out, "[Hostname: %s]", flow->softether.hostname);
}
if (flow->softether.fqdn[0] != '\0')
{
fprintf(out, "[FQDN: %s]", flow->softether.fqdn);
}
break;
case INFO_FTP_IMAP_POP_SMTP:
if (flow->ftp_imap_pop_smtp.username[0] != '\0')
{
@@ -1888,6 +1907,13 @@ static void printFlowSerialized(u_int16_t thread_id,
}
break;
case INFO_SOFTETHER:
ndpi_serialize_string_string(serializer, "client_ip", flow->softether.ip);
ndpi_serialize_string_string(serializer, "client_port", flow->softether.port);
ndpi_serialize_string_string(serializer, "hostname", flow->softether.hostname);
ndpi_serialize_string_string(serializer, "fqdn", flow->softether.fqdn);
break;
case INFO_FTP_IMAP_POP_SMTP:
ndpi_serialize_string_string(serializer, "username",
flow->ftp_imap_pop_smtp.username);