2
1
I am sniffing the in/out packets over TCP. I have some GET output, but I want to know which of the packets is the input? How does the browser determine this?
Simpler explaination: I'm sniffing and I get all GET requests, but I'm not sure how to connect them with the HTTP 200 OK ones.
The thing is that I have 2 streams - input and output. I have to know which HTTP OK packet is the response to each GET packet, but I don't know how. – blez – 2013-03-11T17:57:18.163
2
the ordering you want occures below the HTTP layer at the TCP layer, so the sequencing is handled by the ACK and SYN values in the packets. see here for how those values get initialized and incremented with each packet in the flow: http://en.wikipedia.org/wiki/SYN_%28TCP%29#Connection_establishment . also remember, there may not be a 1-to-1 relation between packets and requests/responses, though it is likely that most requests are sent in a single packet.
– Frank Thomas – 2013-03-11T18:15:10.473