First of all, I might be completely misunderstanding what is needed here as I am new to TCP/IP, so forgive me if I have the wrong end of the networking stick.
I have successfully got the SAM4E demo with the FreeRTOS TCP/IP stack that was originally for Atmel Studio going on Crossworks and spent the week playing around with HTTP. I have data going to and from my desktop Apache server (using GET and POST) which is a great start. It’s reasonably easy to follow and the examples are very helpful indeed.
One thing I am unclear about is that, if I understand correctly, when a GET command is sent to the server, the server sends a load of packets back and when it has finished sending the information, it sends a FIN, ACK packet. Wireshark shows this, indeed, is exactly what happens.
However, I can see no way of getting access to the TCP flags that indicate this. As far as I understand, and indeed can see looking at what is passed to the thread using FreeRTOS_recv(). you just get the data in the TCP packet, not the header too. If I am understanding it correctly, I would need the header and to look at the [TCP] flags to see whether FIN and ACK were both set to know the transmission was complete.
There does seem to be a flags you pass TO the FreeRTOS_recv() function. I was wondering whether that was going to be a pointer to a value when it was implemented and eventually they would be passed back?
- Am I completely misunderstanding how this should work?
- If not, how do I get access to the TCP flags?
- Is this completely the wrong forum to ask this and should be on a TCP/IP forum somewhere completely different?!