# Pcap dump using Napatech card

**URL:** <https://forum.suricata.io/t/pcap-dump-using-napatech-card/227>\
**Category:** Help\
**Created:** [May 13, 2020, 6:50am UTC](https://forum.suricata.io/t/pcap-dump-using-napatech-card/227 "2020-05-13T06:50:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hun6739](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@hun6739](https://forum.suricata.io/u/hun6739)\
**Post date:** [May 13, 2020, 6:50am UTC](https://forum.suricata.io/t/pcap-dump-using-napatech-card/227/1 "2020-05-13T06:50:14Z")

</div>

Hi I am running two suricatas.  
One is running with af-packet configuration and the other with napatech configuration.  
Also, while running suricata, it is dumping pcap files with tshark at the same time.

In the case of af-packet, pcap files can be dumped without any special configuration.  
For napatech, it was not possible to dump the pcap file with tshark.

According to the link below, suricata supports the napatech API, so that other applications can use napatech’s libpcap.  
[https://suricata.readthedocs.io/en/suricata-5.0.0/capture-hardware/napatech.html?highlight=pcap#package-installation](https://suricata.readthedocs.io/en/suricata-5.0.0/capture-hardware/napatech.html?highlight=pcap#package-installation)

My question is, if I want suricata to use napatech API, not libpcap, I want to know if I need some configurations and how to configure it.

-Installation of napatech & suricata was the same as the link below.  
[https://suricata.readthedocs.io/en/suricata-4.0.1/capture-hardware/napatech.html](https://suricata.readthedocs.io/en/suricata-4.0.1/capture-hardware/napatech.html)

Many thanks.

---

<div class="post-metadata">

**Author:** ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)\
**Post date:** [May 13, 2020, 6:08pm UTC](https://forum.suricata.io/t/pcap-dump-using-napatech-card/227/2 "2020-05-13T18:08:43Z")

</div>

Napatech provides the `capture` and `capfileconvert` programs that (1) capture and direct network traffic to a proprietary formatted file (2) which can be converted by `capfileconvert` into a pcap file.

Are you trying to capture pcaps while Suricata is executing using Suricata or will a stand aside solution using `capture` and then later, `capfileconvert` be sufficient?

---

<div class="post-metadata">

**Author:** ![hun6739](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@hun6739](https://forum.suricata.io/u/hun6739)\
**Post date:** [May 14, 2020, 5:44am UTC](https://forum.suricata.io/t/pcap-dump-using-napatech-card/227/3 "2020-05-14T05:44:29Z")

</div>

I want to use tshark because I need to capture pcap using BPF filter, time duration, file size and etc.  
If I can dump a pcap with suricata and set such limits, I can use suricata.  
And I want to know, as I asked at the beginning, that when I install suricata with default settings, suricata use the napatech API.

---

<div class="post-metadata">

**Author:** ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)\
**Post date:** [May 15, 2020, 11:39am UTC](https://forum.suricata.io/t/pcap-dump-using-napatech-card/227/4 "2020-05-15T11:39:18Z")

</div>

Suricata uses the non-PCAP Napatech interface to retrieve packets from the Napatech streams. Napatech can be used in “native” or “pcap” mode (these are not the actual names, but the point is that the Napatech interface is modal).

Thus, `tshark` or equivalent can’t be used directly to retrieve packets while Suricata is also retrieving packets from the Napatech streams.

That’s why I suggested using `capture` and `capfileconvert`. You could set up a pipleline that creates pcap format files and then use your BPF filtering, duration, etc.
