Hi, I took me quite a while to figure out how the tcp checksum is exactly calculated and even longer to transform that into code. The major difficulty lies to understand that the ip pseudo header used for the tcp checksum is not equal to the ordinary ip header and the bitwise operations to calculate the 16-bit aligned checksum. Still I am not able to calculate the checksum correctly :(
I moved my code to a separate file named 'pf' (suboptimal name, but that can be easily changed later on, maybe to 9pf). Furthermore I still couldn't install mercurial, even though I didn't spent too much time on that since I first wanted to have a working NAT. I'm about to transfer my code from the VM to my external OS where I can use mercurial to upload my code. Just needs to beautifying. I had problems with 'Copy/Paste' in acme. For some reason neither the mouse chord (1,2 then 3) nor the tag-line command worked. I posted my problem on 9fans and fgb enlightened me (thx for that). The problem apparently is present when running Plan 9 in VMWare, and could be fixed by commenting few lines in a vmware related file [3]. I was in touch with one of my professors which is interested in low-level networking at high link rates [0] and is (probably) willing to give me some insight in his research [1,2]. I'm not sure what the outcome of our meeting will be, but since he has some experience in this field and particularly packet filters it might be fruitful. This week I'll be continuing hunting the tcp checksum bug and extending NAT to handle UDP and ICMP connections. UDP is similar to TCP to a certain extend, only the stateless nature will involve a different technique to determine whether a packet belongs to a previously started connection, or is a new one. Since ICMP has no notion of ports and those are crucial to distinguish connections on the NAT machine from each other in TCP/UDP, I will need to use the ICMP query id for that. Happy hacking! -- /Manuel [0] http://www.cs.vu.nl/~herbertb/ [1] http://www.usenix.org/events/osdi04/tech/bos.html [2] http://doi.acm.org/10.1145/1400097.1400104 [3] http://9fans.net/archive/2009/06/330 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Plan 9 Google Summer of Code" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/plan9-gsoc?hl=en -~----------~----~----~----~------~----~------~--~---
