mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 08:15:37 +00:00
rpc: Add interface for --tcp-close option
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
committed by
Andrei Vagin
parent
dcf0c915e2
commit
844a72371a
@@ -437,6 +437,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
|
||||
if (req->has_tcp_skip_in_flight)
|
||||
opts.tcp_skip_in_flight = req->tcp_skip_in_flight;
|
||||
|
||||
if (req->has_tcp_close)
|
||||
opts.tcp_close = req->tcp_close;
|
||||
|
||||
if (req->has_weak_sysctls)
|
||||
opts.weak_sysctls = req->weak_sysctls;
|
||||
|
||||
|
@@ -112,6 +112,7 @@ message criu_opts {
|
||||
optional int32 status_fd = 49;
|
||||
optional bool orphan_pts_master = 50;
|
||||
optional string config_file = 51;
|
||||
optional bool tcp_close = 52;
|
||||
}
|
||||
|
||||
message criu_dump_resp {
|
||||
|
11
lib/c/criu.c
11
lib/c/criu.c
@@ -321,6 +321,17 @@ void criu_set_tcp_skip_in_flight(bool tcp_skip_in_flight)
|
||||
criu_local_set_tcp_skip_in_flight(global_opts, tcp_skip_in_flight);
|
||||
}
|
||||
|
||||
void criu_local_set_tcp_close(criu_opts *opts, bool tcp_close)
|
||||
{
|
||||
opts->rpc->has_tcp_close = true;
|
||||
opts->rpc->tcp_close = tcp_close;
|
||||
}
|
||||
|
||||
void criu_set_tcp_close(bool tcp_close)
|
||||
{
|
||||
criu_local_set_tcp_close(global_opts, tcp_close);
|
||||
}
|
||||
|
||||
void criu_local_set_weak_sysctls(criu_opts *opts, bool val)
|
||||
{
|
||||
opts->rpc->has_weak_sysctls = true;
|
||||
|
@@ -66,6 +66,7 @@ void criu_set_ext_unix_sk(bool ext_unix_sk);
|
||||
int criu_add_unix_sk(unsigned int inode);
|
||||
void criu_set_tcp_established(bool tcp_established);
|
||||
void criu_set_tcp_skip_in_flight(bool tcp_skip_in_flight);
|
||||
void criu_set_tcp_close(bool tcp_close);
|
||||
void criu_set_weak_sysctls(bool val);
|
||||
void criu_set_evasive_devices(bool evasive_devices);
|
||||
void criu_set_shell_job(bool shell_job);
|
||||
@@ -175,6 +176,7 @@ void criu_local_set_ext_unix_sk(criu_opts *opts, bool ext_unix_sk);
|
||||
int criu_local_add_unix_sk(criu_opts *opts, unsigned int inode);
|
||||
void criu_local_set_tcp_established(criu_opts *opts, bool tcp_established);
|
||||
void criu_local_set_tcp_skip_in_flight(criu_opts *opts, bool tcp_skip_in_flight);
|
||||
void criu_local_set_tcp_close(criu_opts *opts, bool tcp_close);
|
||||
void criu_local_set_weak_sysctls(criu_opts *opts, bool val);
|
||||
void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices);
|
||||
void criu_local_set_shell_job(criu_opts *opts, bool shell_job);
|
||||
|
Reference in New Issue
Block a user