I am working on an embedded TCP/IP4 stack and HTTP/SNMP/SMTP stuff. It functionally works but I want to make it work faster on LAN. Because of the Nagle's Algorithm and the delayed TCP-ACK, The HTTP application seems to work slow even on LAN.
As can be seen on http://en.wikipedia.org/wiki/IPv4#Private_networks , There are 3 different Private Networks with different bit-block values.
What I will do is that:
- I will first be sure that I am a LAN member by looking at my own IP
- I will look at the dst_ip and check if it belongs to the same LAN as me
Are these enough to prove that me and the other party belong to the same LAN ?
Then of course, I will use a simple hack like sending the same packet twice to speed up the communication. I already tested this and it works but it's optional right now. I want to turn it into a built-in feature.
Thanks in advance...