Conversation
gpotter2
left a comment
There was a problem hiding this comment.
Thanks for the PR!
A few comments. It's a good start !
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4640 +/- ##
==========================================
+ Coverage 80.71% 81.62% +0.90%
==========================================
Files 359 360 +1
Lines 86052 86253 +201
==========================================
+ Hits 69461 70404 +943
+ Misses 16591 15849 -742
|
4eb7a14 to
3c72f1a
Compare
|
Hi, found this when going over the issues in the repository. I suggest you use the following logic I implemented way back during my thesis on IEEE 1588 security - eyalitki/ptpd@4e46fe9#diff-bf2c30fee47c7daecd502ee34e25bc6324ff333f293f9d539d3ec4277764acaf. You can ignore the "encryption" fields as they were part of my thesis and weren't adopted by the IEEE 1588 security committee. Still, the layer implements all non-control messages + Announce, so it should become handy. It served me well in my python scripts for sending/receiving packets, so it is well tested (even if old). I hereby grant full access rights for this code and its derivatives to be used as part of the Scapy repository in any way the maintainers of the repository deem to be fit. Enjoy. |
|
@gpotter2 What do you think? |
|
Looks promising although it should be in |
|
@gpotter2 |
@polybassa @gpotter2
Here is the draft PR to add PTP protocol.
Currently this includes basic PTP header and Sync message type.
Planned additions in future commits:
post_buildfunction to calculate and insert message length field.Let me know if I have followed the correct approach.
fixes #4637