mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
unix: add ability to set callbacks for external sockets (v5)
We don't know a state behind an external socket. It depends on logic of the program, which handles this socket. This patch adds ability to load a library with callbacks for dumping and restoring external sockets. This patch introduces two callbacks cr_plugin_dump_unix_sk and cr_plugin_restore_unix_sk. If a callback can not handle a socket, it must return -ENOTSUP. The main questions, what kind of information should be tranfered in these callbacks. Pls, think a few minutes about that and send me your opinion. v2: Use uflags instread of adding a new field v3: clean up v4: Unsuitable callbacks return -ENOTSUP. v5: set USK_CALLBACK, if a socket was dumped by callback. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
afc61ba562
commit
9e3f4451e1
@@ -7,4 +7,8 @@
|
||||
|
||||
void cr_plugin_fini(void);
|
||||
int cr_plugin_init(void);
|
||||
|
||||
int cr_plugin_dump_unix_sk(int fd, int id);
|
||||
int cr_plugin_restore_unix_sk(int id);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user