DRAFT: Add support for MPTCP
Checklist:
- [x] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
- [ ] I squashed commits belonging together
- [ ] I added unit tests or explained why they are not relevant
- [ ] I executed the regression tests for Python2 and Python3 (using
toxor,cd test && ./run_tests_py2, cd test && ./run_tests_py3) - [x] If the PR is still not finished, please create a Draft Pull Request
fixes #3333
Hi & thanks for the PR ! (sorry for the delay) A few comments:
- you can re-implement your MPTCP dissection module by creating a Scapy packet layer. This will be much faster and will already support building (+ it's much closer to the "scapy spirit")
- you can probably implement that directly into
scapy/layers/inet.py
Supporting this extension would be a nice feature ! Thanks for your interest on that
Hi! Thank you for your answer! I think I understand what you're suggesting, once I have the time again I'll give it a try.
@gpotter2 Sorry for tagging you but I finally had the time to get back to this, and I must confess that I'm now confused by what you suggested before.
I can't quite figure out how I'm supposed to use a Scapy packet layer in the current options parsing of the TCP. I know that at some point there was something like a TcpOption class that could be extended, but now, with the current format, using structs directly when parsing and encoding options I don't understand how this would fit. Should I call directly decode/encode methods from the Packet class or something similar?
I'm sorry if this is something trivial that I'm missing, but if you could elaborate a bit more on how a Packet layer can be used directly with the current logic I would appreciate it.
Thanks in advance.
@RuiCunhaM Do you have an example pcap handy?
Hello @stryngs. I believe the ones in the tcpdump tests cover most of the options in the protocol.
Hello,
Just in case you need more MPTCP (mostly v1) traces, feel free to look at: https://github.com/multipath-tcp/packetdrill/files/7958963/traces.tar.gz (from https://github.com/multipath-tcp/packetdrill/pull/76)
Closing for inactivity.