• Andrey Vagin's avatar
    unix: add ability to set callbacks for external sockets (v5) · 9e3f4451
    Andrey Vagin authored
    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: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    9e3f4451
image.h 2.1 KB