unformat_input_t * input,
vlib_cli_command_t * cmd, int rx_tx)
{
-#define PCAP_DEF_PKT_TO_CAPTURE (1000)
-
unformat_input_t _line_input, *line_input = &_line_input;
u8 *filename;
u8 *chroot_filename = 0;
if (vm->pcap[rx_tx].pcap_enable == 0)
{
enabled = 1;
+ vm->pcap[rx_tx].pcap_main.n_packets_to_capture =
+ PCAP_DEF_PKT_TO_CAPTURE;
}
else
{
{
vlib_cli_output
(vm, "max is %d for any interface to file %s",
- vm->pcap[rx_tx].pcap_main.n_packets_to_capture ?
- vm->pcap[rx_tx].pcap_main.n_packets_to_capture
- : PCAP_DEF_PKT_TO_CAPTURE,
+ vm->pcap[rx_tx].pcap_main.n_packets_to_capture,
vm->pcap[rx_tx].pcap_main.file_name ?
(u8 *) vm->pcap[rx_tx].pcap_main.file_name :
(u8 *) "/tmp/vpe.pcap");
else
{
vlib_cli_output (vm, "max is %d for interface %U to file %s",
- vm->pcap[rx_tx].pcap_main.n_packets_to_capture
- ? vm->pcap[rx_tx].
- pcap_main.n_packets_to_capture :
- PCAP_DEF_PKT_TO_CAPTURE,
+ vm->pcap[rx_tx].pcap_main.n_packets_to_capture,
format_vnet_sw_if_index_name, vnm,
vm->pcap[rx_tx].pcap_sw_if_index,
vm->pcap[rx_tx].
clib_memset (&im->pcap_main, 0, sizeof (im->pcap_main));
im->pcap_main.file_name = (char *) im->pcap_filename;
- im->pcap_main.n_packets_to_capture = 100;
+ im->pcap_main.n_packets_to_capture = PCAP_DEF_PKT_TO_CAPTURE;
if (im->pcap_pkts_to_capture)
im->pcap_main.n_packets_to_capture = im->pcap_pkts_to_capture;