2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-25 03:18:36 +00:00

15 Commits

Author SHA1 Message Date
Pavel Emelyanov
dffe544fe8 show: Show netdevice indices with %d
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-21 16:47:32 +04:00
Pavel Emelyanov
2660b810d9 packet: Rings support
There's no way (currently) to check that the ring got restored.
Will do it once we implement mapping of a packet socket and
tcpdump app test.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-20 15:32:55 +04:00
Pavel Emelyanov
4ee3345beb packet: Support fanout
This one may be present and may be not, thus it's optional in the image.
The C-binding we use report the field absense in the parsed stream via
the has_xxx field, but in the google docs it's stated, that

	"When a message is parsed, if it does not contain an optional
	 element, the corresponding field in the parsed object is set
	 to the default value for that field."

Thus, I also declare the default value for it to be not zero as 0 is
a valid fanout configuration.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-20 15:32:27 +04:00
Pavel Emelyanov
c2bb8404fb packet: Fix collection logging
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-17 16:10:29 +04:00
Pavel Emelyanov
69acf64f57 packet: Add support for mclists
The implementation is rather straightforward. One thing to note
is that non-single membership of each type is not supported. It
can be done, but I'm unaware of any software doing so.

Note: the pb show routine should be tuned to support showing bytes.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-15 21:04:49 +04:00
Pavel Emelyanov
7e3463a855 packet: Add PACKET_COPY_THRESH into dump/restore
No test for it, sorry :( There's no easy way to check it works.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-15 19:41:58 +04:00
Pavel Emelyanov
fb5a5671c8 sock: Do strict socket family checks when looking up collected socket
We hash socket with inode and family, but search only by inode. Well,
yes, family should match, since all sockets are in one sockfs in kernel,
but let's make sure _we_ did things right by checking the family as well.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-15 19:16:12 +04:00
Pavel Emelyanov
4ff60cd870 packet: Switch to use packet diag module
It's in net-next already and does provide all we currently
need (and more). Implementation is like for inet and unix
sockets.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-15 17:39:21 +04:00
Pavel Emelyanov
51133437c9 fd: Remove per-filetype make_gen_id abstraction
It doesn't makemuch sense in pulling this further. The generic genid generation seems to
be enough for eny file type.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-11 22:41:29 +04:00
Pavel Emelyanov
7422176427 pscketsk: Add loss and timestamp sockoptions
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 19:23:31 +04:00
Pavel Emelyanov
d29feb9103 packetsk: Add support for auxdata, origdev and vnethdr bits
These are boolean in reality.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 18:13:02 +04:00
Pavel Emelyanov
3ef8d138ab packetsk: Support PACKET_RESERVE option
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 17:38:15 +04:00
Pavel Emelyanov
1259a9ad80 packetsk: Support PACKET_VERSION sockoption
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 17:34:40 +04:00
Pavel Emelyanov
216a3a6521 sk: Add level to socket option dump/restore helpers
Packet socket need SOL_PACKET one.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 17:25:11 +04:00
Pavel Emelyanov
fc7071d05e net: Packet sockets basic support
Support only basic packet socket functionality -- create and bind.
This should be enough to start testing dhclient inside container.
Other stuff (filter, mmaps, fanouts, etc.) will come later.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 16:17:41 +04:00