Implement TCP server Automaton
As a child class of TCP_client, new TCP_server automatically completes a TCP handshake when a client connects and is integrated with supersocket. Inspiration was taken from #2409
Anything that could be removed due to parent class was removed. States were required to stay due to Automaton design.
While working on this, I found/fixed a bug within TCP_client that would cause the ACK number of a response from data to be wrong when a small amount of data was sent. Padding was being considered in the length for the ack number when it is not in the protocol.
Part of #399
Codecov Report
Merging #3690 (9961fa9) into master (2c92b03) will decrease coverage by
0.06%. The diff coverage is33.33%.
@@ Coverage Diff @@
## master #3690 +/- ##
==========================================
- Coverage 86.23% 86.16% -0.07%
==========================================
Files 296 296
Lines 66907 66987 +80
==========================================
+ Hits 57698 57722 +24
- Misses 9209 9265 +56
| Impacted Files | Coverage Δ | |
|---|---|---|
| scapy/layers/inet.py | 65.28% <33.33%> (-1.95%) |
:arrow_down: |
| scapy/arch/windows/__init__.py | 67.73% <0.00%> (-0.57%) |
:arrow_down: |
| scapy/contrib/automotive/ecu.py | 94.33% <0.00%> (-0.34%) |
:arrow_down: |
| scapy/layers/ntp.py | 84.55% <0.00%> (-0.28%) |
:arrow_down: |
| scapy/fields.py | 90.72% <0.00%> (-0.06%) |
:arrow_down: |
| scapy/layers/l2.py | 76.90% <0.00%> (+0.69%) |
:arrow_up: |
Thanks for your PR. Looks good, so far. Could you please provide some unit-tests?
I will continue this soon, been out of town for a bit so please don't close
Still working on this @jabbate19 ?
Closing for inactivity.