Improvements for exporting info in MDNS and UBNTAC2 protocols
Added test pcap file for UBNTAC2
This commit is contained in:
@@ -387,7 +387,7 @@ static void printFlow(u_int16_t thread_id, struct ndpi_flow_info *flow) {
|
||||
flow->packets, (long long unsigned int) flow->bytes);
|
||||
|
||||
if(flow->host_server_name[0] != '\0') fprintf(out, "[Host: %s]", flow->host_server_name);
|
||||
|
||||
if(flow->info[0] != '\0') fprintf(out, "[%s]", flow->info);
|
||||
|
||||
if(flow->ssh_ssl.client_info[0] != '\0') fprintf(out, "[client: %s]", flow->ssh_ssl.client_info);
|
||||
if(flow->ssh_ssl.server_info[0] != '\0') fprintf(out, "[server: %s]", flow->ssh_ssl.server_info);
|
||||
|
||||
+5
-1
@@ -516,8 +516,12 @@ static unsigned int packet_processing(struct ndpi_workflow * workflow,
|
||||
}
|
||||
|
||||
if(n == 0) flow->bittorent_hash[0] = '\0';
|
||||
} else if(flow->detected_protocol.protocol == NDPI_PROTOCOL_MDNS) {
|
||||
snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.mdns.answer);
|
||||
} else if(flow->detected_protocol.protocol == NDPI_PROTOCOL_UBNTAC2) {
|
||||
snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.ubntac2.version);
|
||||
}
|
||||
|
||||
|
||||
if((proto == IPPROTO_TCP) && (flow->detected_protocol.protocol != NDPI_PROTOCOL_DNS)) {
|
||||
if(flow->detected_protocol.protocol == NDPI_PROTOCOL_SSH) {
|
||||
snprintf(flow->ssh_ssl.client_info, sizeof(flow->ssh_ssl.client_info), "%s",
|
||||
|
||||
@@ -58,6 +58,7 @@ typedef struct ndpi_flow_info {
|
||||
// result only, not used for flow identification
|
||||
ndpi_protocol detected_protocol;
|
||||
|
||||
char info[96];
|
||||
char host_server_name[192];
|
||||
char bittorent_hash[41];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user