Hello, guys.
So, here's transparent TCP connection hijacking (ie. checkpointing in
one process and restoring in another) which adds only relatively small
pieces to the kernel. It's by no means complete but already works
rather reliably in my test setup even with heavy delay induced with
tc.
I wrote a rather long README describing how it's working, what's
missing which is appended at the end of this mail so if you're
interested in the details please go ahead and read.
Several ioctls are added to enable TCP connection CR, which adds
around 130 lines of code. Note that the interface is ugly. As said
above, it's proof-of-concept. We'll need a bit more information
exported and knobs to turn and hopefully prettier interface.
As my knowledge of networking is fairly rudimentary, I only tried to
get the basics working. e.g. I didn't try to store negotiated options
and re-establish them on restoration (ie. window scaling, mss, various
extra features), and am likely to have made wrong assumptions even on
the basics. If you spot some, please shout.
The source is available in the following git branch (just git clone
from the URL)
https://htejun@code.google.com/p/ptrace-parasite/
and can be browsed at
http://code.google.com/p/ptrace-parasite/source/browse/
I'm attaching the tcp-ioctls.patch and the source tarball.
Thanks.
http://lwn.net/Articles/454304/
看不懂,好象是tcp连接hijack和恢复的。