Skip to content
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

Add TCP_server #2409

Closed
wants to merge 1 commit into from
Closed

Add TCP_server #2409

wants to merge 1 commit into from

Conversation

Maxmawt
Copy link

@Maxmawt Maxmawt commented Jan 14, 2020

Add a TCP server as requested in #2083.

The server completes the 3way handshake by sending the SA and checking the receive of the resulting ack.

For unit testing, I thought adding it in the same file that the ones for the TCP_client but it did not find them.

@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #2409 into master will increase coverage by 0.23%.
The diff coverage is 42.85%.

@@            Coverage Diff            @@
##           master   #2409      +/-   ##
=========================================
+ Coverage   87.37%   87.6%   +0.23%     
=========================================
  Files         242     242              
  Lines       50656   50739      +83     
=========================================
+ Hits        44261   44452     +191     
+ Misses       6395    6287     -108
Impacted Files Coverage Δ
scapy/layers/inet.py 71.25% <42.85%> (-1.89%) ⬇️
scapy/utils6.py 87.24% <0%> (+0.45%) ⬆️
scapy/arch/pcapdnet.py 70.7% <0%> (ø) ⬆️
scapy/autorun.py 82.64% <0%> (+4.13%) ⬆️
scapy/arch/bpf/core.py 87.25% <0%> (+5.88%) ⬆️
scapy/arch/common.py 89.39% <0%> (+13.63%) ⬆️
scapy/layers/dhcp6.py 85.75% <0%> (+21.51%) ⬆️
scapy/arch/bpf/supersocket.py 75.44% <0%> (-1.34%) ⬇️

@gpotter2
Copy link
Member

Thanks for the PR !

You should make TCP_server a subclass of TCP_client, or a common parent. This way, each time a function is exactly the same in both, you don't have copy paste it. This will make things cleaner

@gpotter2
Copy link
Member

closed for inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants