github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/runc/libcontainer/criurpc/criurpc.proto (about)

     1  message criu_page_server_info {
     2  	optional string		address	= 1;
     3  	optional int32		port	= 2;
     4  	optional int32		pid	= 3;
     5  	optional int32		fd	= 4;
     6  }
     7  
     8  message criu_veth_pair {
     9  	required string		if_in	= 1;
    10  	required string		if_out	= 2;
    11  };
    12  
    13  message ext_mount_map {
    14  	required string		key	= 1;
    15  	required string		val	= 2;
    16  };
    17  
    18  message inherit_fd {
    19  	required string		key	= 1;
    20  	required int32		fd	= 2;
    21  };
    22  
    23  message cgroup_root {
    24  	optional string		ctrl	= 1;
    25  	required string		path	= 2;
    26  };
    27  
    28  message unix_sk {
    29  	required uint32		inode 	= 1;
    30  };
    31  
    32  enum criu_cg_mode {
    33  	IGNORE	= 0;
    34  	NONE	= 1;
    35  	PROPS	= 2;
    36  	SOFT	= 3;
    37  	FULL	= 4;
    38  	STRICT	= 5;
    39  	DEFAULT = 6;
    40  };
    41  
    42  message criu_opts {
    43  	required int32			images_dir_fd	= 1;
    44  	optional int32			pid		= 2; /* if not set on dump, will dump requesting process */
    45  
    46  	optional bool			leave_running	= 3;
    47  	optional bool			ext_unix_sk	= 4;
    48  	optional bool			tcp_established	= 5;
    49  	optional bool			evasive_devices	= 6;
    50  	optional bool			shell_job	= 7;
    51  	optional bool			file_locks	= 8;
    52  	optional int32			log_level	= 9 [default = 2];
    53  	optional string			log_file	= 10; /* No subdirs are allowed. Consider using work-dir */
    54  
    55  	optional criu_page_server_info	ps		= 11;
    56  
    57  	optional bool			notify_scripts	= 12;
    58  
    59  	optional string			root		= 13;
    60  	optional string			parent_img	= 14;
    61  	optional bool			track_mem	= 15;
    62  	optional bool			auto_dedup	= 16;
    63  
    64  	optional int32			work_dir_fd	= 17;
    65  	optional bool			link_remap	= 18;
    66  	repeated criu_veth_pair		veths		= 19;
    67  
    68  	optional uint32			cpu_cap		= 20 [default = 0xffffffff];
    69  	optional bool			force_irmap	= 21;
    70  	repeated string			exec_cmd	= 22;
    71  
    72  	repeated ext_mount_map		ext_mnt		= 23;
    73  	optional bool			manage_cgroups	= 24; /* backward compatibility */
    74  	repeated cgroup_root		cg_root		= 25;
    75  
    76  	optional bool			rst_sibling	= 26; /* swrk only */
    77  	repeated inherit_fd		inherit_fd	= 27; /* swrk only */
    78  
    79  	optional bool			auto_ext_mnt	= 28;
    80  	optional bool			ext_sharing 	= 29;
    81  	optional bool			ext_masters	= 30;
    82  
    83  	repeated string			skip_mnt	= 31;
    84  	repeated string			enable_fs	= 32;
    85  
    86  	repeated unix_sk                unix_sk_ino     = 33;
    87  
    88  	optional criu_cg_mode		manage_cgroups_mode = 34;
    89  	optional uint32			ghost_limit	= 35 [default = 0x100000];
    90  	repeated string			irmap_scan_paths = 36;
    91  	repeated string			external	= 37;
    92  	optional uint32			empty_ns	= 38;
    93  	optional bool			no_seccomp	= 39;
    94  }
    95  
    96  message criu_dump_resp {
    97  	optional bool restored		= 1;
    98  }
    99  
   100  message criu_restore_resp {
   101  	required int32 pid		= 1;
   102  }
   103  
   104  message criu_notify {
   105  	optional string script		= 1;
   106  	optional int32	pid		= 2;
   107  }
   108  
   109  enum criu_req_type {
   110  	EMPTY		= 0;
   111  	DUMP		= 1;
   112  	RESTORE		= 2;
   113  	CHECK		= 3;
   114  	PRE_DUMP	= 4;
   115  	PAGE_SERVER	= 5;
   116  
   117  	NOTIFY		= 6;
   118  
   119  	CPUINFO_DUMP	= 7;
   120  	CPUINFO_CHECK	= 8;
   121  
   122  	FEATURE_CHECK	= 9;
   123  }
   124  
   125  /*
   126   * List of features which can queried via
   127   * CRIU_REQ_TYPE__FEATURE_CHECK
   128   */
   129  message criu_features {
   130  	optional bool			mem_track	= 1;
   131  }
   132  
   133  /*
   134   * Request -- each type corresponds to must-be-there
   135   * request arguments of respective type
   136   */
   137  
   138  message criu_req {
   139  	required criu_req_type		type		= 1;
   140  
   141  	optional criu_opts		opts		= 2;
   142  	optional bool			notify_success	= 3;
   143  
   144  	/*
   145  	 * When set service won't close the connection but
   146  	 * will wait for more req-s to appear. Works not
   147  	 * for all request types.
   148  	 */
   149  	optional bool			keep_open	= 4;
   150  	/*
   151  	 * 'features' can be used to query which features
   152  	 * are supported by the installed criu/kernel
   153  	 * via RPC.
   154  	 */
   155  	optional criu_features		features	= 5;
   156  }
   157  
   158  /*
   159   * Response -- it states whether the request was served
   160   * and additional request-specific information
   161   */
   162  
   163  message criu_resp {
   164  	required criu_req_type		type		= 1;
   165  	required bool			success		= 2;
   166  
   167  	optional criu_dump_resp		dump		= 3;
   168  	optional criu_restore_resp	restore		= 4;
   169  	optional criu_notify		notify		= 5;
   170  	optional criu_page_server_info	ps		= 6;
   171  
   172  	optional int32			cr_errno	= 7;
   173  	optional criu_features		features	= 8;
   174  }