restore: socket queues support
restore: socket queues support

This patch was designed to be generic and thus usable for all kinds of
sockets. Not sure, thah this goal has been reached, but at least I tried.

Key ideas:
1) sockets queue dump file have to be readed first and then packets entries
   with offset for it's data in image will be collected in doubly linked list by
   read_sockets_queue() function.

Note: list will contain sockets queues for all (!) the sockets of the task.

2) socket queue can be restored by restore_socket_queue(), which selects
   packets from the list by passed id and use sendfile() top send them to the
   passed socket. It also removes packet from the list and frees it.

Based on xemul@ patches.

Signed-off-by: Stanislav Kinsbursky <43b28e187c4fe6e53d7ab0bb71957481e322f182@openvz.org>
Acked-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
Signed-off-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@openvz.org>

AuthenticEshkinKot/criu,sdgdsffdsfff/criu,eabatalov/criu,AuthenticEshkinKot/criu,wtf42/criu,gablg1/criu,gonkulator/criu,LK4D4/criu,biddyweb/criu,svloyso/criu,sdgdsffdsfff/criu,wtf42/criu,gablg1/criu,gablg1/criu,KKoukiou/criu-remote,gonkulator/criu,kawamuray/criu,fbocharov/criu,gonkulator/criu,rentzsch/criu,ldu4/criu,kawamuray/criu,kawamuray/criu,KKoukiou/criu-remote,svloyso/criu,eabatalov/criu,wtf42/criu,kawamuray/criu,sdgdsffdsfff/criu,LK4D4/criu,rentzsch/criu,KKoukiou/criu-remote,ldu4/criu,LK4D4/criu,wtf42/criu,tych0/criu,AuthenticEshkinKot/criu,KKoukiou/criu-remote,efiop/criu,KKoukiou/criu-remote,wtf42/criu,tych0/criu,sdgdsffdsfff/criu,marcosnils/criu,kawamuray/criu,fbocharov/criu,svloyso/criu,ldu4/criu,rentzsch/criu,efiop/criu,tych0/criu,svloyso/criu,kawamuray/criu,tych0/criu,sdgdsffdsfff/criu,fbocharov/criu,efiop/criu,eabatalov/criu,gablg1/criu,marcosnils/criu,rentzsch/criu,eabatalov/criu,fbocharov/criu,marcosnils/criu,LK4D4/criu,efiop/criu,biddyweb/criu,eabatalov/criu,tych0/criu,AuthenticEshkinKot/criu,tych0/criu,LK4D4/criu,rentzsch/criu,gonkulator/criu,svloyso/criu,fbocharov/criu,efiop/criu,svloyso/criu,rentzsch/criu,wtf42/criu,biddyweb/criu,fbocharov/criu,ldu4/criu,ldu4/criu,gablg1/criu,KKoukiou/criu-remote,sdgdsffdsfff/criu,biddyweb/criu,gonkulator/criu,marcosnils/criu,biddyweb/criu,ldu4/criu,eabatalov/criu,biddyweb/criu,LK4D4/criu,efiop/criu,AuthenticEshkinKot/criu,marcosnils/criu,marcosnils/criu,gonkulator/criu,gablg1/criu,AuthenticEshkinKot/criu