2018-12-04 10:29:18 -05:00
|
|
|
How to build a vpp dispatch trace aware Wireshark
|
|
|
|
=================================================
|
|
|
|
|
2019-01-17 09:30:43 -05:00
|
|
|
The vpp pcap dispatch trace dissector has been merged into the wireshark
|
|
|
|
main branch, so the process is simple. Download wireshark, compile it,
|
|
|
|
and install it.
|
2018-12-04 10:29:18 -05:00
|
|
|
|
2019-01-17 09:30:43 -05:00
|
|
|
Download wireshark source code
|
|
|
|
------------------------------
|
2018-12-04 10:29:18 -05:00
|
|
|
|
2019-01-17 09:30:43 -05:00
|
|
|
The wireshark git repo is large, so it takes a while to clone.
|
2018-12-04 10:29:18 -05:00
|
|
|
|
|
|
|
```
|
2019-01-17 09:30:43 -05:00
|
|
|
git clone https://code.wireshark.org/review/wireshark
|
2018-12-04 10:29:18 -05:00
|
|
|
```
|
|
|
|
|
2019-01-17 09:30:43 -05:00
|
|
|
Install prerequisite packages
|
2018-12-04 10:29:18 -05:00
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
Here is a list of prerequisite packages which must be present in order
|
|
|
|
to compile wireshark, beyond what's typically installed on an Ubuntu
|
|
|
|
18.04 system:
|
|
|
|
|
|
|
|
```
|
2019-01-17 09:30:43 -05:00
|
|
|
libgcrypt11-dev flex bison qtbase5-dev qttools5-dev-tools qttools5-dev
|
|
|
|
qtmultimedia5-dev libqt5svg5-dev libpcap-dev qt5-default
|
2018-12-04 10:29:18 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
Compile Wireshark
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
Mercifully, Wireshark uses cmake, so it's relatively easy to build, at
|
2019-01-17 09:30:43 -05:00
|
|
|
least on Ubuntu 18.04.
|
2018-12-04 10:29:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
```
|
2019-01-17 09:30:43 -05:00
|
|
|
$ cd wireshark
|
|
|
|
$ mkdir build
|
|
|
|
$ cd build
|
|
|
|
$ cmake -G Ninja ../
|
|
|
|
$ ninja -j 8
|
|
|
|
$ sudo ninja install
|
2018-12-04 10:29:18 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
Make a pcap dispatch trace
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
Configure vpp to pass traffic in some fashion or other, and then:
|
|
|
|
|
2019-01-17 09:30:43 -05:00
|
|
|
|
2018-12-04 10:29:18 -05:00
|
|
|
```
|
|
|
|
vpp# pcap dispatch trace on max 10000 file vppcapture buffer-trace dpdk-input 1000
|
|
|
|
```
|
|
|
|
|
2019-01-17 09:30:43 -05:00
|
|
|
|
2018-12-04 10:29:18 -05:00
|
|
|
or similar. Run traffic for long enough to capture some data. Save the
|
|
|
|
dispatch trace capture like so:
|
|
|
|
|
|
|
|
```
|
|
|
|
vpp# pcap dispatch trace off
|
|
|
|
```
|
|
|
|
|
|
|
|
Display in Wireshark
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
Display /tmp/vppcapture in the vpp-enabled version of wireshark. With
|
|
|
|
any luck, normal version of wireshark will refuse to process vpp
|
|
|
|
dispatch trace pcap files because they won't understand the encap type.
|
|
|
|
|
|
|
|
Set wireshark to filter on vpp.bufferindex to watch a single packet
|
|
|
|
traverse the forwarding graph. Otherwise, you'll see a vector of packets
|
2019-01-17 09:30:43 -05:00
|
|
|
in e.g. ip4-lookup, then a vector of packets in ip4-rewrite, etc.
|