docs: convert plugins doc md->rst
[vpp.git] / docs / gettingstarted / developers / buildwireshark.md
1 How to build a vpp dispatch trace aware Wireshark
2 =================================================
3
4 The vpp pcap dispatch trace dissector has been merged into the wireshark
5 main branch, so the process is simple. Download wireshark, compile it,
6 and install it.
7
8 Download wireshark source code
9 ------------------------------
10
11 The wireshark git repo is large, so it takes a while to clone.
12
13 ```
14     git clone https://code.wireshark.org/review/wireshark
15 ```
16
17 Install prerequisite packages
18 ------------------------------------
19
20 Here is a list of prerequisite packages which must be present in order
21 to compile wireshark, beyond what's typically installed on an Ubuntu
22 18.04 system:
23
24 ```
25     libgcrypt11-dev flex bison qtbase5-dev qttools5-dev-tools qttools5-dev
26     qtmultimedia5-dev libqt5svg5-dev libpcap-dev qt5-default
27 ```
28
29 Compile Wireshark
30 -----------------
31
32 Mercifully, Wireshark uses cmake, so it's relatively easy to build, at
33 least on Ubuntu 18.04.
34
35
36 ```
37     $ cd wireshark
38     $ mkdir build
39     $ cd build
40     $ cmake -G Ninja ../
41     $ ninja -j 8
42     $ sudo ninja install
43 ```
44
45 Make a pcap dispatch trace
46 --------------------------
47
48 Configure vpp to pass traffic in some fashion or other, and then:
49
50
51 ```
52     vpp# pcap dispatch trace on max 10000 file vppcapture buffer-trace dpdk-input 1000
53 ```
54
55
56 or similar. Run traffic for long enough to capture some data. Save the
57 dispatch trace capture like so:
58
59 ```
60     vpp# pcap dispatch trace off
61 ```
62
63 Display in Wireshark
64 --------------------
65
66 Display /tmp/vppcapture in the vpp-enabled version of wireshark. With
67 any luck, normal version of wireshark will refuse to process vpp
68 dispatch trace pcap files because they won't understand the encap type.
69
70 Set wireshark to filter on vpp.bufferindex to watch a single packet
71 traverse the forwarding graph. Otherwise, you'll see a vector of packets
72 in e.g. ip4-lookup, then a vector of packets in ip4-rewrite, etc.