-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Added CoAP socket #4334
base: master
Are you sure you want to change the base?
Added CoAP socket #4334
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4334 +/- ##
==========================================
- Coverage 81.90% 81.59% -0.32%
==========================================
Files 330 353 +23
Lines 76380 84332 +7952
==========================================
+ Hits 62561 68812 +6251
- Misses 13819 15520 +1701
|
245e388
to
7ee64b2
Compare
Any idea on how I can fix these failed tests? |
Tests are failing on versions older than 3.9. You're using 3.9+ specific features. Scapy should work with anything starting from 3.7, so this probably needs to be updated. |
Fixing response payload Some docstring and bug fixes. Finished CoAP server logic implementation Added client interaction Client/Server done. Added delayed response handling Fixing small problems Unit tests Documentation
@gpotter2 Thanks for the insights, it is ready for reviews :D |
- Moved the defines/enumerators to coap.py - Changed the send() function to match the SuperSocket declaration - Updated unit tests
Could you please implement a select function for your socket, so that sr, sr1 and sniff will work. Could you please also provide unit tests for these functions. |
Hello, thanks for the review, I updated the code to include a select function, I'm not sure about the error in the macos tests. About the changes, I'm not sure if those can be considered "correct", it feels like workarounds. Because:
Is there a better way of doing this? Thanks so far :) |
Description
This PR implements a CoAP socket, pretty similar on how ISOTPSoftSocket works.
I implemented the basic message exchange, mostly based on the RFC-7252.
Known-limitations
General comments
It has a dependency for
from scapy.contrib.isotp.isotp_soft_socket import TimeoutScheduler
, I found nice how this is implemented, so I just used it, I didn't want to copy/paste again.Also I added some unit tests for the basic cases.
Quick usage