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>
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>
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>
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>
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>
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>
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>