summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/pcap.c3
-rw-r--r--src/vppinfra/pcap_funcs.h3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/vppinfra/pcap.c b/src/vppinfra/pcap.c
index 8f644e30f1d..0ca923e81cf 100644
--- a/src/vppinfra/pcap.c
+++ b/src/vppinfra/pcap.c
@@ -157,9 +157,6 @@ pcap_write (pcap_main_t * pm)
pm->n_pcap_data_written = 0;
}
- if (pm->n_packets_captured >= pm->n_packets_to_capture)
- pcap_close (pm);
-
done:
if (error)
{
diff --git a/src/vppinfra/pcap_funcs.h b/src/vppinfra/pcap_funcs.h
index 364f4be2333..a3a3072f955 100644
--- a/src/vppinfra/pcap_funcs.h
+++ b/src/vppinfra/pcap_funcs.h
@@ -22,6 +22,9 @@ clib_error_t *pcap_write (pcap_main_t * pm);
/** Read data from file. */
clib_error_t *pcap_read (pcap_main_t * pm);
+/** Close the file created by pcap_write function. */
+clib_error_t *pcap_close (pcap_main_t * pm);
+
/**
* @brief Add packet
*