@@ -42,9 +42,12 @@ More information about Black, you find at
4242The following software is required to run PTF:
4343
4444 * Python 3.x
45- * Scapy 2.5.0 (unless you provide another packet manipulation module)
46- * pypcap (optional - VLAN tests will fail without this)
47- * tcpdump (optional - Scapy will complain if it's missing)
45+
46+ The following packages are optional for running PTF:
47+
48+ * Scapy 2.5.0 (you may also use the included ` bf_pktpy ` module instead)
49+ * pypcap (VLAN tests will fail without this)
50+ * tcpdump (Scapy will complain if it's missing)
4851
4952Root/sudo privilege is required on the host, in order to run ` ptf ` .
5053
@@ -74,11 +77,7 @@ apt-get install tcpdump
7477
7578### Using ` bf_pktpy ` as an alternate packet manipulation module
7679
77- The Python module ` bf_pktpy ` is included as part of the
78- ` open-p4studio ` repository:
79-
80- + https://github.com/p4lang/open-p4studio/tree/main/pkgsrc/ptf-modules/bf-pktpy
81-
80+ The Python module ` bf_pktpy ` is included as part of the ptf package.
8281It was developed as an alternative to ` scapy ` . The tradeoffs of using
8382` bf_pktpy ` vs. ` scapy ` are:
8483
@@ -89,34 +88,7 @@ It was developed as an alternative to `scapy`. The tradeoffs of using
8988 under a different license.
9089+ ` bf_pktpy ` implements only a small subset of the functionality of
9190 ` scapy ` , but it does include support for very commonly-used packet
92- headers. It is released under an Apache 2.0 license (see
93- https://github.com/p4lang/open-p4studio/blob/main/pkgsrc/ptf-modules/bf-pktpy/LICENSE ).
94-
95- The package ` bf_pktpy ` is not currently available from PyPI. To
96- install ` bf_pktpy ` from source code, choose one of these methods:
97-
98- ``` bash
99- pip install " bf-pktpy@git+https://github.com/p4lang/open-p4studio#subdirectory=pkgsrc/ptf-utils/bf-pktpy"
100- ```
101-
102- ``` bash
103- git clone https://github.com/p4lang/open-p4studio
104- cd open-p4studio/pkgsrc/ptf-utils/bf-pktpy
105- pip install .
106- ```
107-
108- To make effective use of ` bf_pktpy ` you must also install these
109- additional Python packages. All are released under an MIT or
110- BSD-3-Clause license, which are compatible for releasing with
111- ` bf_pktpy ` , or for importing in a project with most licenses,
112- including ` Apache-2.0 ` , ` BSD-3-Clause ` , ` GPL-2.0-only ` , or many
113- others.
114-
115- ``` bash
116- pip install six getmac scapy_helper psutil
117- sudo apt-get install python3-dev
118- pip install netifaces
119- ```
91+ headers. It is released under an Apache 2.0 license.
12092
12193If you want to use ` bf_pktpy ` when running the command ` ptf ` from the
12294command line, provide the ` -pmm ` option as shown below.
@@ -274,9 +246,9 @@ timeout takes precedence over the global timeout passed on the command line.
274246## Pluggable packet manipulation module
275247
276248By default, ` ptf ` uses ` Scapy ` as the packet manipulation module, but it can
277- also operate on a different one.
249+ also operate on a different one, e.g. the included ` bf_pktpy ` module.
278250
279- Such module ** must define/implement the same symbols** , as defined in ` Scapy `
251+ Such a module ** must define/implement the same symbols** , as defined in ` Scapy `
280252implementation of packet. Most of them are just names of most common frame
281253headers (Ether, IP, TCP, UDP, ...).
282254
0 commit comments