October 30, 2022

BSD TCP/IP for Kyu - Routing information in the TCP code?

I was surprised to find the TCP code dealing with routing information at all. I would expect this to be handled entirely in the IP layer.

Many of the TCP files in the netinet directory include the file net/route.h. My first inspection led me to hope this file was being used because of some structure shared by the TCP code that inadvertantly referenced routing.

Unfortunately this is not the case. Code in tcp_input.c (in tcp_mss()) aims to discover the mss value based on routing information. The same code does MTU calculations.

I don't see the Xinu TCP code doing this sort of thing. This undoubtedly serves a purpose in allowing the code to perform well doing some long haul transfers. I am willing to sacrifice that performance for simplicity in Kyu.

This will require some attention later, I am ignoring it for now.


Have any comments? Questions? Drop me a line!

Kyu / [email protected]