Changes

Jump to navigation Jump to search
1 byte added ,  19:06, 21 September 2013
no edit summary
Line 5: Line 5:     
== Protobuf messages ==
 
== Protobuf messages ==
criu_req/criu_resp -- wrappers for requests/responses. They are to be used for transferring messages. It is needed to provide compatibility with an older versions of rpc. Field type in them _must_ be set accordingly to type of request/response that is stored. Types of request/response are defined in enum criu_req_type.
+
criu_req/criu_resp -- wrappers for requests/responses. They are to be used for transferring messages and needed to provide compatibility with an older versions of rpc. Field type in them _must_ be set accordingly to type of request/response that is stored. Types of request/response are defined in enum criu_req_type.
 
  −
=== criu_req_type ===
  −
There is only 1 request/response type for now.
  −
<pre>enum criu_req_type {
  −
EMPTY = 0;
  −
DUMP = 1;
  −
}
  −
</pre>
  −
 
      
=== criu_req ===
 
=== criu_req ===
Line 22: Line 13:     
optional criu_dump_req dump = 2;
 
optional criu_dump_req dump = 2;
 +
}
 +
</pre>
 +
 +
==== criu_req_type ====
 +
There is only 1 request/response type for now.
 +
<pre>enum criu_req_type {
 +
EMPTY = 0;
 +
DUMP = 1;
 
}
 
}
 
</pre>
 
</pre>
    
==== criu_dump_req ====
 
==== criu_dump_req ====
criu_dump_req is used to store dump options.
+
It is used to store dump options.
 
<pre>message criu_dump_req {
 
<pre>message criu_dump_req {
 
required int32 images_dir_fd = 1;
 
required int32 images_dir_fd = 1;
Line 67: Line 66:  
Field "restored" is set to "true" if process was restored.
 
Field "restored" is set to "true" if process was restored.
   −
== Server ==
+
== Run ==
 +
=== Server ===
 
On a server side, CRIU creates SOCK_SEQPACKET Unix socket and listens for connections on it. After receiving criu_req, CRIU processes it, do what is requested and sends response back.
 
On a server side, CRIU creates SOCK_SEQPACKET Unix socket and listens for connections on it. After receiving criu_req, CRIU processes it, do what is requested and sends response back.
   Line 78: Line 78:  
For the full list of options, please run "criu -h".
 
For the full list of options, please run "criu -h".
   −
== Client ==
+
=== Client ===
 
Client, in its turn, must connect to service socket, send criu_msg with request in it, and wait for a criu_resp with response.
 
Client, in its turn, must connect to service socket, send criu_msg with request in it, and wait for a criu_resp with response.
 
You can find examples of client programs in C and Python in test/rpc/.
 
You can find examples of client programs in C and Python in test/rpc/.
85

edits

Navigation menu