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 Report
Additional details and impacted files@@ Coverage Diff @@
## master #4334 +/- ##
==========================================
+ Coverage 81.90% 82.15% +0.24%
==========================================
Files 330 351 +21
Lines 76380 83547 +7167
==========================================
+ Hits 62561 68640 +6079
- Misses 13819 14907 +1088
|
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. |
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