Changes

Jump to navigation Jump to search
70 bytes added ,  16:57, 30 April 2013
some more formatting
Line 27: Line 27:  
When set the queue to repair as described above, one can call recv or send syscalls on a repaired socket. Both calls
 
When set the queue to repair as described above, one can call recv or send syscalls on a repaired socket. Both calls
 
result on peeking or poking data from/to the respective queue. This sounds funny, but yes, for repaired socket one
 
result on peeking or poking data from/to the respective queue. This sounds funny, but yes, for repaired socket one
can receve the outgoing and send the incoming queues. Using the MSG_PEEK flag for recv is required.
+
can receve the outgoing and send the incoming queues. Using the <code>MSG_PEEK</code> flag for <code>recv()</code> is required.
    
=== Options ===
 
=== Options ===
Line 38: Line 38:  
* tstamp -- whether timestamps on packets are supported
 
* tstamp -- whether timestamps on packets are supported
   −
All four can be read with getsockopt calls to a socket and in order to restore them the TCP_REPAIR_OPTIONS sockoption
+
All four can be read with <code>getsockopt()</code> calls to a socket and in order to restore them the <code>TCP_REPAIR_OPTIONS</code> sockoption is introduced.
is introduced.
      
== Checkpoint and restore TCP connection ==
 
== Checkpoint and restore TCP connection ==
Line 46: Line 45:  
state and restores it back letting the protocol resurrect the data sequence.
 
state and restores it back letting the protocol resurrect the data sequence.
   −
One thing to note here -- while the socket is closed between dump and restore the connection should be "locked", i.e.
+
One thing to note here while the socket is closed between dump and restore the connection should be "locked", i.e.
 
no packets from peer should enter the stack, otherwise the RST will be sent by a kernel. In order to do so a simple
 
no packets from peer should enter the stack, otherwise the RST will be sent by a kernel. In order to do so a simple
 
netfilter rule is configured that drops all the packets from peer to a socket we're dealing with. This rule sits
 
netfilter rule is configured that drops all the packets from peer to a socket we're dealing with. This rule sits
Line 52: Line 51:  
criu restore one.
 
criu restore one.
   −
That said, the command line option --tcp-established should be used when calling criu to explicitly state, that the
+
That said, the command line option <code>--tcp-established</code> should be used when calling criu to explicitly state, that the
 
caller is aware of this "transitional" state of the netfilter.
 
caller is aware of this "transitional" state of the netfilter.
  

Navigation menu