mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
parasite: support sockets queues
This patch adds sockets queue dump functionality. Key ideas 1) sockets info is passed as plain array in parasite args. 2) new socket option SO_PEEK_OFF with MSG_PEEK is used to read the get the queue's packets. 3) Buffer for packet will be allocated for each socket separately and with size of socket sending buffer. For stream sockets is means, that it's queue will be dumped in chunks of this size. Note: loop around sys_msgrcv() is required for DGRAM sockets - sys_msgrcv() with MSG_PEEK will return only one packet. Based on xemul@ patches. Signed-off-by: Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
committed by
Cyrill Gorcunov
parent
4ad2e61ce7
commit
8ce9e94705
@@ -5,6 +5,12 @@
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct sk_queue_item {
|
||||
int fd;
|
||||
int type;
|
||||
unsigned int sk_id;
|
||||
};
|
||||
|
||||
struct cr_fdset;
|
||||
extern int try_dump_socket(pid_t pid, int fd, const struct cr_fdset *cr_fdset);
|
||||
|
||||
|
Reference in New Issue
Block a user