-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add CBOR codec and BPv7 packet classes #4875
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
base: master
Are you sure you want to change the base?
Conversation
da6269d to
d8c22bd
Compare
d8c22bd to
87d2661
Compare
…nitial BPv7 packets
87d2661 to
a5b8d37
Compare
|
@BrianSipos Thanks a lot for this PR. Please have a look at the failing tests. I would also recommend to move the CBOR implementation into "contrib". |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4875 +/- ##
===========================================
- Coverage 80.87% 48.00% -32.88%
===========================================
Files 368 354 -14
Lines 90262 90663 +401
===========================================
- Hits 72998 43521 -29477
- Misses 17264 47142 +29878
🚀 New features to boost your workflow:
|
|
@polybassa one need for BPv7 is a CRC-16 and CRC-32C generator. Right now this uses |
|
@BrianSipos We will merge #4855 into Scapy. However, we didn't decided yet into which directory. Can you use the crc implementation from this PR for your use case? |
I believe so. The ones depended upon originally are well documented to be able to check known inputs. Any idea if the CBOR portions of this PR are any more likely to be accepted than the other PR? When submitting this one, I didn't even realize there was an alternative one. The CBOR portion of this PR is, I believe, more general purpose and does not need any outside/new library dependencies for scapy. |
|
Hi. Yeah we need to take the time to compare them both and get the best one (or take the good ideas and tests from both). Sorry for the delay. (I should have much more time available around the holidays to review all of that..) |
This change addresses #4874 by adding new base scapy classes to encode and decode CBOR structure RFC 8949. This is in support of a new protocol support for BPv7 RFC 9171. This work was adapted from earlier out-of-source additions from dtn-demo-agent.
Both include a minimal set of unit tests to cover normal behavior. Since this is focused on immediate needs for BPv7 the CBOR fields and packets are not exhaustive.
Fixes #4874