Skip to content
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

Replace occurrences of scapy with pktmanip for "packet manipulation module" #216

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

jafingerhut
Copy link
Collaborator

@jafingerhut jafingerhut commented Feb 21, 2025

except those few places where scapy is actually a requirement, e.g. in the code that actually imports Scapy as the selected packet manipulation module.

It is expected that these PRs are approved and merged before this one:

jafingerhut and others added 7 commits February 16, 2025 17:16
…odule"

except those few places where scapy is actually a requirement, e.g. in
the code that actually imports Scapy as the selected packet
manipulation module.

Signed-off-by: Andy Fingerhut <[email protected]>
Signed-off-by: Andy Fingerhut <[email protected]>
@jafingerhut jafingerhut marked this pull request as draft February 21, 2025 06:20
@jafingerhut
Copy link
Collaborator Author

This has been rebased to be "on top of" the changes proposed in PR #213

That one should be reviewed before paying attention to this one, which I will soon put in draft mode.

The purpose of these changes is to avoid using the name 'scapy' in the "production" part of the ptf package, i.e. the files that are imported when you run ptf or do import ptf, except in the very few places where the user says they want to use Scapy as their ptf packet manipulation module. Before these changes, there were several places where the name 'scapy' was used as an alias for the module 'ptf.packet', which is misleading if the user selects a non-scapy package as their packet manipulation module.

If they say they want bf-pktpy as their packet manipulation module, then except for two if-then-else branches that are never taken, there is no mention of the word 'scapy' in the source.

These changes leave explicit uses of scapy in ptf test programs, that are not part of the production ptf code, in these directories:

  • ptf_nn/
  • utests/
  • .github/workflows/
  • src/ptf/packet_scapy.py - This file is part of the production ptf package, but it is only if the user selects scapy as their packet manipulation module. This file's contents are completely ignored if the user selects bf-pktpy as their packet manipulation module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant