#ifdef DLT_LOOP
{ null_if_print, DLT_LOOP },
#endif
-#if defined(DLT_PFLOG) && defined(HAVE_NET_IF_PFLOG_H)
+#ifdef DLT_PFLOG
{ pflog_if_print, DLT_PFLOG },
#endif
#ifdef DLT_PKTAP
#ifdef ENABLE_INSTRUMENT_FUNCTIONS
extern int profile_func_level;
+static int pretty_print_packet_level = -1;
#endif
void
if (ndo->ndo_print_sampling && packets_captured % ndo->ndo_print_sampling != 0)
return;
+#ifdef ENABLE_INSTRUMENT_FUNCTIONS
+ if (pretty_print_packet_level == -1)
+ pretty_print_packet_level = profile_func_level;
+#endif
+
if (ndo->ndo_packet_number)
ND_PRINT("%5u ", packets_captured);
/* Print the full packet */
ndo->ndo_ll_hdr_len = 0;
#ifdef ENABLE_INSTRUMENT_FUNCTIONS
- /* truncation => reassignment, currently: 1 (main is 0) */
- profile_func_level = 1;
+ /* truncation => reassignment */
+ profile_func_level = pretty_print_packet_level;
#endif
break;
}