mai_lapyst, After spending yesterday entirely by re-implementing #tcp in #userspace I now know:
- TCP is weird
- we have the PSH flag that completly makes the data ignore the TCP sending/recieve buffers and directly writes into the application's stream
- ACK can be part of literally any other package; you also can SYN, FIN or PSH data while ACK'ing
- zero-length data packages technically exist, but they dont do anything; they dont even wake up the FD when it's in a epoll
- the #linux #kernel is funny: it responds with RST to incomming TCP packets, even on raw sockets; you'll need to drop them via #iptables if you want to implement TCP in userspace
Learned a lot! Now I can go on and create a few tests for #webservers; mainly SYN floodings and so on.