net mapping code |
2006-06-09
|
I recently wrote some code that I am planning to use to figure out network topology inside Flumotion, based on the information about TCP connections between two hosts.
In short - every TCP connection has two endpoints, and each endpoint has two IP addresses - the local IP address, and the remote IP address. one endpoint's local address is not necessarily the same as the other endpoint's remote address - NAT will mangle one of the two.
The code I wrote exploits this to figure out where NAT hosts are, and which hosts are behind the same NAT box.
I'm sure there must be similar code out there somewhere - someone must have already thought about these problems, no ? My code is up at https://apestaart.org/thomas/trac/browser/tests/twisted/ten, feel free to take a look and give it a try.