# Introducing nBPF: line-rate hardware packet filtering (yes Wireshark at 100G is possible) | ntop

> Modern network adapters such as Exablaze, Napatech and Silicom’s Intel FM10K, support hardware filters. Unfortunately every company has its own way to set fil

[Blog](https://www.ntop.org/blog/)[PF\_RING](https://www.ntop.org/category/pf_ring/)

# Introducing nBPF: line-rate hardware packet filtering (yes Wireshark at 100G is possible)

October 6, 20162 min read

Modern network adapters such as [Exablaze](http://www.exablaze.com), [Napatech](http://www.napatech.com) and Silicom’s [Intel FM10K](http://www.silicom-usa.com/pr/server-adapters/networking-adapters/100-gigabit-ethernet-networking-server-adapters/pe3100g2dqirl-server-adapter/), support hardware filters. Unfortunately every company has its own way to set filters, no unified API, and no support of any BPF-like filters. Most of the network monitoring community instead is used to set filters using BPF and thus powerful hardware filtering is present but unused.

This has been the driving force for developing nBPF (ntop BPF). We have realized that most of the times filters include IP, port and protocol, that are exactly the features that hardware-based filters support. Thus we have written from scratch a BPF interpreter able to convert a subset (that should satisfy most of the user needs) of BPF. Filtering happens in hardware if possible, leaving to software-based filtering (as with the classic BPF) the final cleanup, only if necessary.

Libpcap-based application such as Wireshark or tcpdump, can immediately take advantage of nBPF by simply using the lib cap-over-PF\_RING library. Example suppose that you want to use Wireshark with nBPF on interface nt:0. All you have to do is:

1.  Install the prerequisite libraries/drivers for your NIC.
2.  git clone https://github.com/ntop/PF\_RING.git
3.  Compile PF\_RING including the libpcap library under PF\_RING/userland/libpcap
4.  Install PF\_RING. We assume that the libcap-over-PF\_RING library in installed under /usr/local/lib
5.  git clone https://github.com/ntop/n2disk.git
6.  cd PF\_RING/tools
7.  sudo su
8.  ./n2if up -i nt:0 -d napatech0
9.  LD\_LIBRARY\_PATH=/usr/local/lib/ wireshark

In this case in the wireshark capture window you will see a new adapter named napatech0, on which you can capture traffic. Supposing you want to capture tcp packets sent by host 1.2.3.4 you just have to set your filter in Wireshark as usual

[![nBPF](/images/2016/10/Screen-Shot-2016-10-06-at-18.50.56.webp)](https://www.ntop.org/images/2016/10/Screen-Shot-2016-10-06-at-18.50.56.webp)

and voila. Instead of overflooding wireshark with packets, your favourite packet analyser will receive only the packets your are interested in, as all filtering happens in hardware. People who have used wireshark at 10 Gbit or more, know that with this technology you can finally analyse live traffic, thing that was not possible until today.

If you want to see a demo of nBPF you can watch the video below.  
  
nBPF is released in source code as part of PF\_RING. You can find the [code on github](https://github.com/ntop/PF_RING/tree/dev/userland/nbpf) where you can also find implementation notes and README for the various supported NICs.

This is just a preview of nBPF. We will present it extensively at the upcoming conference [Sharkfest Europe](https://sharkfesteurope.wireshark.org) later this month, where ntop organises a [free half-day workshop](https://www.ntop.org/youre-invited-to-the-ntop-users-meeting-and-free-tutorial-at-sharkfest-europe-2016/) (you do not have to be registered for the sharkfest to attend it). See you soon mates!

## Keep reading

centoJan 25, 2026

### [nProbe Cento at Scale: Flow Offload Acceleration on Napatech](https://www.ntop.org/nprobe-cento-at-scale-flow-offload-acceleration-on-napatech/)

High-speed networks continue to push the limits of software-based monitoring and security applications. As link speeds grow and traffic patterns become more complex, efficiently analyzing packets while maintaining per-flow state, for updating…

AnnounceApr 28, 2025

### [Released PF\_RING 9.0.0: Fully Fledged Hardware Flow Tracking](https://www.ntop.org/released-pf_ring-9-0-0-fully-fledged-hardware-flow-tracking/)

This is to announce a new PF\_RING release 9.0.0! This release brings significant improvements for a deeper flow tracking integrations, making PF\_RING even more powerful for building high-performance flow processing networking applications…

PF\_RINGAug 6, 2024

### [Released PF\_RING 8.8.0: Flow Table Offload and nVidia BlueField Support](https://www.ntop.org/released-pf_ring-8-8-flow-table-offload-and-nvidia-bluefield-support/)

This is to announce a new PF\_RING release 8.8.0! This release adds generic support for flow table offload, which is currently supported on Napatech adapters with Flow Manager enabled. This new technology…

## Try it on your own network

Download the free Community edition and see your first flows in five minutes.

[Download ntopng free](https://www.ntop.org/support/documentation/software-installation/)[Talk to an engineer](https://www.ntop.org/support/need-help/contacts/)
Source: https://www.ntop.org/introducing-nbpf-line-rate-hardware-packet-filtering-yes-wireshark-at-100g-is-possible/