Skip to content

Commit 0736416

Browse files
committed
Update access to ndpi metadata in ftflow example
1 parent b770709 commit 0736416

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

userland/examples_ft/ftflow.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,15 @@ void processFlow(pfring_ft_flow *flow, void *user){
274274
action_to_string(pfring_ft_flow_get_action(flow)));
275275

276276
switch(v->l7_protocol.master_protocol) {
277-
case 5:
277+
case 5: /* DNS */
278278
if (v->l7_metadata.dns.query != NULL)
279279
printf(", query: %s", v->l7_metadata.dns.query);
280280
printf(", queryType: %u, replyCode: %u",
281281
v->l7_metadata.dns.queryType,
282282
v->l7_metadata.dns.replyCode);
283283
break;
284284

285-
case 7:
285+
case 7: /* HTTP */
286286
if (v->l7_metadata.http.serverName != NULL)
287287
printf(", hostName: %s", v->l7_metadata.http.serverName);
288288
if (v->l7_metadata.http.url != NULL)
@@ -291,16 +291,14 @@ void processFlow(pfring_ft_flow *flow, void *user){
291291
printf(", responseCode: %u", v->l7_metadata.http.responseCode);
292292
break;
293293

294-
case 91:
294+
case 91: /* TLS */
295295
if (v->l7_metadata.tls.serverName != NULL)
296296
printf(", hostName: %s", v->l7_metadata.tls.serverName);
297297
#ifdef PRINT_NDPI_INFO
298298
if (enable_l7_extra) {
299299
struct ndpi_flow_struct *ndpi_flow = pfring_ft_flow_get_ndpi_handle(flow);
300-
if (ndpi_flow->protos.tls_quic.ja3_server[0])
301-
printf(", ja3s: '%s'", ndpi_flow->protos.tls_quic.ja3_server);
302-
if (ndpi_flow->protos.tls_quic.ja3_client[0])
303-
printf(", ja3c: '%s'", ndpi_flow->protos.tls_quic.ja3_client);
300+
if (ndpi_flow->protos.tls_quic.ja4_client[0])
301+
printf(", ja4c: '%s'", ndpi_flow->protos.tls_quic.ja4_client);
304302
}
305303
#endif
306304
break;

0 commit comments

Comments
 (0)