Skip to content

Enable more common bf-pktpy and scapy names to be used through ptf package #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
39d35f3
Enable batch-install.sh to run on Ubuntu 22.04
jafingerhut Jan 16, 2025
ecc22c1
Merge remote-tracking branch 'upstream/main' into main
jafingerhut Jan 16, 2025
5f5c312
Merge branch 'main' of https://github.com/p4lang/open-p4studio into main
jafingerhut Jan 17, 2025
113e4f1
Merge branch 'main' of https://github.com/p4lang/open-p4studio
jafingerhut Jan 17, 2025
4becb30
Merge branch 'main' of github.com:jafingerhut/open-p4studio
jafingerhut Jan 17, 2025
d94cdd5
Merge branch 'main' of https://github.com/p4lang/open-p4studio
jafingerhut Jan 21, 2025
5a28bf0
Merge branch 'main' of https://github.com/p4lang/open-p4studio
jafingerhut Jan 21, 2025
14807ca
Merge remote-tracking branch 'upstream/main'
jafingerhut Jan 22, 2025
38a5340
Merge remote-tracking branch 'upstream/main' into main
jafingerhut Jan 29, 2025
09b4a9c
Merge branch 'main' of https://github.com/p4lang/open-p4studio into main
jafingerhut Jan 29, 2025
2f3cf06
Merge branch 'main' of https://github.com/p4lang/open-p4studio into main
jafingerhut Feb 5, 2025
f7ea382
Merge remote-tracking branch 'up/main'
jafingerhut Feb 17, 2025
7533bd6
Merge branch 'main' of https://github.com/p4lang/open-p4studio into main
jafingerhut Feb 18, 2025
ce6ab36
Merge branch 'main' of https://github.com/p4lang/open-p4studio into main
jafingerhut Feb 19, 2025
c33ff05
Merge remote-tracking branch 'up/main'
jafingerhut Feb 23, 2025
3932127
Make more function names usable via ptf when common in bf-pktpy and s…
jafingerhut Mar 6, 2025
5bf8041
Merge remote-tracking branch 'up/main' into enable-more-common-bf-pkt…
jafingerhut Mar 6, 2025
3d678db
Remove unnecessary comment
jafingerhut Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions pkgsrc/ptf-modules/bf-pktpy/bf_pktpy/ptf/packet_pktpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
see PTF documentation (section "Pluggable packet manipulation module").
"""
import bf_pktpy.packets
import bf_pktpy.commands
from bf_pktpy.all import hexdump as bf_pktpy_hexdump, ls as bf_pktpy_ls
from ptf import config

Expand Down Expand Up @@ -119,3 +120,20 @@ def get_erspan_alternative():
# bf_pktpy implementation of hexdump
hexdump = bf_pktpy_hexdump
ls = bf_pktpy_ls

# The names below are assigned here so that, like the other names
# above, they can be used by importers of the ptf.packet module as if
# they were defined inside of ptf.packet, and they are commonly
# available as ptf.packet.<name> regardless whether you use scapy or
# bf-pktpy as the packet manipulation module.

send = bf_pktpy.commands.send
sendp = bf_pktpy.commands.sendp
sr = bf_pktpy.commands.sr
sr1 = bf_pktpy.commands.sr1
srp = bf_pktpy.commands.srp
srp1 = bf_pktpy.commands.srp1
srloop = bf_pktpy.commands.srloop
srploop = bf_pktpy.commands.srploop
sniff = bf_pktpy.commands.sniff
bridge_and_sniff = bf_pktpy.commands.bridge_and_sniff
Loading