Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
8f05162b
Commit
8f05162b
authored
Jun 25, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libcriu: Add add_veth_pair call
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
1a5a0344
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
criu.c
lib/criu.c
+35
-0
criu.h
lib/criu.h
+1
-0
No files found.
lib/criu.c
View file @
8f05162b
...
...
@@ -205,6 +205,41 @@ er:
return
-
ENOMEM
;
}
int
criu_add_veth_pair
(
char
*
in
,
char
*
out
)
{
int
nr
;
CriuVethPair
**
a
,
*
p
;
p
=
malloc
(
sizeof
(
*
p
));
if
(
!
p
)
goto
er
;
p
->
if_in
=
strdup
(
in
);
if
(
!
p
->
if_in
)
goto
er_p
;
p
->
if_out
=
strdup
(
out
);
if
(
!
p
->
if_out
)
goto
er_i
;
nr
=
opts
->
n_veths
+
1
;
a
=
realloc
(
opts
->
veths
,
nr
*
sizeof
(
p
));
if
(
!
a
)
goto
er_o
;
a
[
nr
-
1
]
=
p
;
opts
->
veths
=
a
;
opts
->
n_veths
=
nr
;
return
0
;
er_o:
free
(
p
->
if_out
);
er_i:
free
(
p
->
if_in
);
er_p:
free
(
p
);
er:
return
-
ENOMEM
;
}
static
CriuResp
*
recv_resp
(
int
socket_fd
)
{
unsigned
char
buf
[
CR_MAX_MSG_SIZE
];
...
...
lib/criu.h
View file @
8f05162b
...
...
@@ -49,6 +49,7 @@ void criu_set_cpu_cap(unsigned int cap);
void
criu_set_root
(
char
*
root
);
int
criu_set_exec_cmd
(
int
argc
,
char
*
argv
[]);
int
criu_add_ext_mount
(
char
*
key
,
char
*
val
);
int
criu_add_veth_pair
(
char
*
in
,
char
*
out
);
/* Here is a table of return values and errno's of functions
* from the list down below.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment