Keep It Simple, Stupid | |
PerlMonks |
Re^3: Piggybacking data on TCP ACKby zek152 (Pilgrim) |
on Jun 17, 2011 at 18:52 UTC ( [id://910237]=note: print w/replies, xml ) | Need Help?? |
I think we are using the same terminology to refer to 2 different things. After a connection is made:
Then the ACK flag (or bit) is kept high for all subsequent packets. I used the term ACK to mean specifically the packet sent in response to a SYN+ACK packet, I did not mean to use it to refer to any packet with the ACK flag set. You are correct that data is allowed to be sent during the 3 way handshaking provided that it remains in a buffer until the connection is established (from RFC 793). So the data does (should) not be passed up the stack until the connection is made. I currently do not have access to a computer with the libpcap library but this code should help get you started towards your goal.
Disclaimer: This code might be missing some things. I was not able to test it but it should help you see how to form a packet and send it. The specific fields will need to be correctly set and I might be missing a few.
In Section
Seekers of Perl Wisdom
|
|