Support Multiple Comments in Packet Object#4798
Conversation
…riter classes for back compatibility
|
Hi @gpotter2 , this is my first contribution to the repo. Could you please review this PR? Let me know if there's anything I should fix. Thanks! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4798 +/- ##
==========================================
+ Coverage 80.08% 80.90% +0.82%
==========================================
Files 365 366 +1
Lines 89027 90158 +1131
==========================================
+ Hits 71296 72946 +1650
+ Misses 17731 17212 -519
🚀 New features to boost your workflow:
|
|
Hi again @gpotter2, just following up on this PR. We have a need for this feature in our project, so I’d really appreciate a review when you have the time. Please let me know if any changes are needed. Thanks in advance! |
|
Thanks for the PR and sorry for the delay of review. I have a few questions regarding the code. |
Let me know if there's anything else I should take care of before this can be merged. Appreciate your time! |
|
I also personally would have kept comments in the same argument index as comment, rather than adding it at the end. |
That's a fair point, and I understand the value of maintaining positional consistency. In this case, since we changed both the name and the type (comment: |
|
@gpotter2 I hope all is well. I wanted to gently follow up on my comment on the PR. I'd be grateful for your thoughts whenever you get a chance. |
guedou
left a comment
There was a problem hiding this comment.
Thanks for the PR. I made a second review.
|
LGTM although tests don't pass. |
I fixed typing and linting issues. I noticed a few # type: ignore lines — that makes sense here since mypy can’t infer the types, but according to the pcapng spec we know they are bytes or List[bytes] |
…acking in PcapNgReader
|
@bkayranci please keep comments at the same location as comment in the methods. |
Co-authored-by: Guillaume Valadon <guillaume@valadon.net>
gpotter2
left a comment
There was a problem hiding this comment.
Thanks for the PR & sorry for the back and forth. Have a good week
The pcapng format specification explicitly allows for multiple comments to be associated with a packet via repeated opt_comment fields. This change brings Scapy closer to that standard, making it easier to work with multi-comment pcapng traces and enabling richer annotations in packet analysis.
Checklist:
cd test && ./run_testsortox)