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

Implement TCP stack #9

Open
Tracked by #3
hikalium opened this issue Aug 4, 2023 · 5 comments
Open
Tracked by #3

Implement TCP stack #9

hikalium opened this issue Aug 4, 2023 · 5 comments
Assignees
Labels
P0 Urgent

Comments

@hikalium
Copy link
Owner

hikalium commented Aug 4, 2023

No description provided.

@hikalium
Copy link
Owner Author

hikalium commented Aug 4, 2023

echo "hello" | nc -N localhost 18080
nc -l localhost 18080

@hikalium
Copy link
Owner Author

hikalium commented Aug 4, 2023

$ sudo WIRESHARK_LOG_LEVEL=CRITICAL tshark -i lo -Y 'tcp.port==18080' -T fields -e _ws.col.Info
Running as user "root" and group "root". This could be dangerous.
Capturing on 'Loopback: lo'
52510 → 18080 [SYN] Seq=0 Win=65495 Len=0 MSS=65495 SACK_PERM=1 TSval=2889372268 TSecr=0 WS=128
18080 → 52510 [SYN, ACK] Seq=0 Ack=1 Win=65483 Len=0 MSS=65495 SACK_PERM=1 TSval=2889372268 TSecr=2889372268 WS=128
52510 → 18080 [ACK] Seq=1 Ack=1 Win=65536 Len=0 TSval=2889372268 TSecr=2889372268
52510 → 18080 [PSH, ACK] Seq=1 Ack=1 Win=65536 Len=6 TSval=2889372268 TSecr=2889372268
18080 → 52510 [ACK] Seq=1 Ack=7 Win=65536 Len=0 TSval=2889372268 TSecr=2889372268
52510 → 18080 [FIN, ACK] Seq=7 Ack=1 Win=65536 Len=0 TSval=2889372268 TSecr=2889372268
18080 → 52510 [FIN, ACK] Seq=1 Ack=8 Win=65536 Len=0 TSval=2889372268 TSecr=2889372268
52510 → 18080 [ACK] Seq=8 Ack=2 Win=65536 Len=0 TSval=2889372268 TSecr=2889372268

@hikalium
Copy link
Owner Author

hikalium commented Aug 4, 2023

sudo tcpdump -i lo -f "tcp port 18080" -w tcp_hello.pcapng

@hikalium
Copy link
Owner Author

hikalium commented Aug 4, 2023

hikalium@penguin:~$ tshark -r tcp_hello.pcapng -Y 'tcp.port==18080' -T fields -e _ws.col.Info
55962 → 18080 [SYN] Seq=0 Win=65476 Len=0 MSS=65476 SACK_PERM=1 TSval=1445116958 TSecr=0 WS=128
18080 → 55962 [SYN, ACK] Seq=0 Ack=1 Win=65464 Len=0 MSS=65476 SACK_PERM=1 TSval=1445116958 TSecr=1445116958 WS=128
55962 → 18080 [ACK] Seq=1 Ack=1 Win=65536 Len=0 TSval=1445116958 TSecr=1445116958
55962 → 18080 [PSH, ACK] Seq=1 Ack=1 Win=65536 Len=6 TSval=1445116958 TSecr=1445116958
18080 → 55962 [ACK] Seq=1 Ack=7 Win=65536 Len=0 TSval=1445116958 TSecr=1445116958
55962 → 18080 [FIN, ACK] Seq=7 Ack=1 Win=65536 Len=0 TSval=1445116958 TSecr=1445116958
18080 → 55962 [FIN, ACK] Seq=1 Ack=8 Win=65536 Len=0 TSval=1445116958 TSecr=1445116958
55962 → 18080 [ACK] Seq=8 Ack=2 Win=65536 Len=0 TSval=1445116959 TSecr=1445116958

@hikalium
Copy link
Owner Author

hikalium commented Aug 4, 2023

0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 04   ..............`.                        
0010  20 8c 00 28 06 40 00 00 00 00 00 00 00 00 00 00    ..(.@..........
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................
0030  00 00 00 00 00 01 da 9a 46 a0 03 6c f9 fc 00 00   ........F..l....                        
0040  00 00 a0 02 ff c4 00 30 00 00 02 04 ff c4 04 02   .......0........
0050  08 0a 56 22 bc 1e 00 00 00 00 01 03 03 07         ..V"..........                          
                                                                                                       
0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 02   ..............`.                        
0010  44 61 00 28 06 40 00 00 00 00 00 00 00 00 00 00   Da.(.@..........
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................
0030  00 00 00 00 00 01 46 a0 da 9a b0 92 ba e4 03 6c   ......F........l                        
0040  f9 fd a0 12 ff b8 00 30 00 00 02 04 ff c4 04 02   .......0........
0050  08 0a 56 22 bc 1e 56 22 bc 1e 01 03 03 07         ..V"..V"......                          
                                                                                                       
0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 04   ..............`.                        
0010  20 8c 00 20 06 40 00 00 00 00 00 00 00 00 00 00    .. .@..........
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................
0030  00 00 00 00 00 01 da 9a 46 a0 03 6c f9 fd b0 92   ........F..l....                        
0040  ba e5 80 10 02 00 00 28 00 00 01 01 08 0a 56 22   .......(......V"
0050  bc 1e 56 22 bc 1e                                 ..V"..                                  
                                                                                                       
0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 04   ..............`.                        
0010  20 8c 00 26 06 40 00 00 00 00 00 00 00 00 00 00    ..&.@..........
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................
0030  00 00 00 00 00 01 da 9a 46 a0 03 6c f9 fd b0 92   ........F..l....                        
0040  ba e5 80 18 02 00 00 2e 00 00 01 01 08 0a 56 22   ..............V"
0050  bc 1e 56 22 bc 1e 68 65 6c 6c 6f 0a               ..V"..hello.                            
                                                                                                       
0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 02   ..............`.                        
0010  44 61 00 20 06 40 00 00 00 00 00 00 00 00 00 00   Da. .@..........
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................
0030  00 00 00 00 00 01 46 a0 da 9a b0 92 ba e5 03 6c   ......F........l                        
0040  fa 03 80 10 02 00 00 28 00 00 01 01 08 0a 56 22   .......(......V"
0050  bc 1e 56 22 bc 1e                                 ..V"..                                  
                                                                                                       
0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 04   ..............`.                        
0010  20 8c 00 20 06 40 00 00 00 00 00 00 00 00 00 00    .. .@..........
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................
0030  00 00 00 00 00 01 da 9a 46 a0 03 6c fa 03 b0 92   ........F..l....                        
0040  ba e5 80 11 02 00 00 28 00 00 01 01 08 0a 56 22   .......(......V"
0050  bc 1e 56 22 bc 1e                                 ..V"..                                  
                                                                                                       
0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 02   ..............`.                               
0010  44 61 00 20 06 40 00 00 00 00 00 00 00 00 00 00   Da. .@..........                               
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................                               
0030  00 00 00 00 00 01 46 a0 da 9a b0 92 ba e5 03 6c   ......F........l                                   
0040  fa 04 80 11 02 00 00 28 00 00 01 01 08 0a 56 22   .......(......V"                                   
0050  bc 1e 56 22 bc 1e                                 ..V"..                                                      
                                                                                                                    
0000  00 00 00 00 00 00 00 00 00 00 00 00 86 dd 60 04   ..............`.                                                      
0010  20 8c 00 20 06 40 00 00 00 00 00 00 00 00 00 00    .. .@..........                                                      
0020  00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00   ................                                                      
0030  00 00 00 00 00 01 da 9a 46 a0 03 6c fa 04 b0 92   ........F..l....                                                      
0040  ba e6 80 10 02 00 00 28 00 00 01 01 08 0a 56 22   .......(......V"                                                      
0050  bc 1f 56 22 bc 1e                                 ..V"..

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

No branches or pull requests

1 participant