I know the endianess on hosts and network may be different but why the byte order is important?
I think there are two reasons:
1 for the router to check the ip header(likeaddresses), the routers only recognize big-endian order(network byte order) 2 for the receiving host to recognize the byte order of the packets. Since the receiving host doesn't know the byte order of the sending host, if the byte order is not converted to network byte order, it doesn't know the packet byte order.
am I right?
so for the following fields, which should be converted to byte order, and why?
1 TCP/UDP Header options, like MSS, timestamps
2 TCP/UDP header checksum
3 TCP sequence number
4 UDP/TCP data fields