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

Add support for Simple Two-Way Active Measurement Protocol (STAMP) #3742

Merged
merged 2 commits into from Sep 28, 2022

Conversation

cscarpitta
Copy link
Contributor

This PR adds the support for the Simple Two-Way Active Measurement Protocol (STAMP) to Scapy. STAMP enables the measurement of both one-way and round-trip performance metrics, like delay, delay variation, and packet loss.

This PR implements the main specifications of STAMP described in RFC 8762 and the STAMP Test Session Identifier (SSID) defined in Section 3 of RFC 8972.

Signed-off-by: Carmine Scarpitta carmine.scarpitta@uniroma2.it

@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Merging #3742 (997d33e) into master (799f272) will increase coverage by 0.05%.
The diff coverage is 86.48%.

@@            Coverage Diff             @@
##           master    #3742      +/-   ##
==========================================
+ Coverage   86.00%   86.05%   +0.05%     
==========================================
  Files         299      301       +2     
  Lines       68111    68341     +230     
==========================================
+ Hits        58579    58811     +232     
+ Misses       9532     9530       -2     
Impacted Files Coverage Δ
scapy/contrib/stamp.py 86.48% <86.48%> (ø)
scapy/arch/windows/__init__.py 67.16% <0.00%> (-0.56%) ⬇️
scapy/contrib/automotive/ecu.py 94.33% <0.00%> (-0.34%) ⬇️
scapy/pipetool.py 84.10% <0.00%> (-0.23%) ⬇️
scapy/config.py 80.55% <0.00%> (ø)
scapy/layers/mspac.py 93.67% <0.00%> (ø)
scapy/fields.py 91.34% <0.00%> (+0.53%) ⬆️
scapy/layers/kerberos.py 70.93% <0.00%> (+1.02%) ⬆️
scapy/layers/dcerpc.py 78.62% <0.00%> (+1.88%) ⬆️

scapy/layers/stamp.py Outdated Show resolved Hide resolved
scapy/layers/stamp.py Outdated Show resolved Hide resolved
scapy/config.py Outdated Show resolved Hide resolved
@cscarpitta
Copy link
Contributor Author

@gpotter2 Many thanks for the quick review. I addressed all your suggestions and force-updated the branch.

@cscarpitta
Copy link
Contributor Author

@gpotter2 I updated the PR to fix some docstring warnings reported by Sphinx

@cscarpitta
Copy link
Contributor Author

Build doc is failing with the following error:

Theme error:
An error happened in rendering the page advanced_usage.
Reason: ValueError('too many values to unpack (expected 3)')
ERROR: InvocationError for command /home/runner/work/scapy/scapy/.tox/docs/bin/sphinx-build -W --keep-going -b html . _build/html (exited with code 2)

This is due to a bug in sphinx_rtd_theme, which does not work correctly with the latest sphinx version.

The problem is described here: sphinx-doc/sphinx#10853 (comment)
There is an open PR to fix the problem in sphinx_rtd_theme: readthedocs/sphinx_rtd_theme#1344

Maybe we need a workaround waiting for the PR to be merged?

Copy link
Member

@gpotter2 gpotter2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is looking good, just two minor questions !

scapy/contrib/stamp.py Show resolved Hide resolved
scapy/contrib/stamp.py Show resolved Hide resolved
This commit adds the support for
Simple Two-Way Active Measurement Protocol (STAMP).

Simple Two-Way Active Measurement Protocol:
https://www.rfc-editor.org/rfc/rfc8762.html

Simple Two-Way Active Measurement Protocol Optional Extensions:
https://www.rfc-editor.org/rfc/rfc8972.html

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
@cscarpitta
Copy link
Contributor Author

@gpotter2 Thank you for the great review! I added source port binding and force-pushed the branch.

@p-l- p-l- merged commit a1f999f into secdev:master Sep 28, 2022
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.

None yet

3 participants