ct: add ability to add devices in container

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ct: don't use ... in set_options

I can't find how to handle it to create go bindings

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ct: mount proc if CT doesn't use host root

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libct: Add libnl as git submodule

Ubuntu 14.04 contains old version of libnl, which can't work with
veth devices.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: use libnl

This patch replaces our netlink code on libnl calls.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libnl: return handle on net device

It will be used to configure it.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
namespaces: export net_ns

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: add function to apply configuration on net device

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: add ability to set mac address

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: remove parts of rpc

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libct_net_dev_set_master

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ct: add a function to initialize handle for net device

We are going to add ip addresses list and save opts for peer devices.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: get peer device

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: add ability to add ip addresses

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
util: add function to set a string value

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
net: add ability to set routes (v2)

When we want to create a new route, we need to allocate it,
libct returns a handle, which is used for setting parameters.

v2: don't fail if routes are not set
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
debug: logfd = 2
fs: add suppor of read-only and private bind-mounts

Signed-off-by: Andrey Vagin <avagin@openvz.org>
libct: add initial go bindings

This patch is a prototype. I'm going to implement all other functions,
when all of you will say that it's what we want.

Cc: Michael Crosby <crosbymichael@gmail.com>
Cc: Dmitry Guryanov <dguryanov@parallels.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
net: initialize name for a moved device

This patch fixes segmentation fault of the ct_net_host test:
./ct_net_host > ct_net_host.out
Segmentation fault (core dumped)