]> git.ipfire.org Git - thirdparty/lxc.git/commit
network: introduce a interface named lxc_netdev_isup().
authorDongsheng Yang <yangds.fnst@cn.fujitsu.com>
Tue, 16 Sep 2014 05:09:59 +0000 (13:09 +0800)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 25 Nov 2014 21:52:47 +0000 (16:52 -0500)
commit42bb0b6ff1c594cd0eca242776cc2613340b0db0
tree25a362a2728a493e63c5db5eea63a671a35403bc
parentc77c0644a372dc6d98791dde6f3020815da296bf
network: introduce a interface named lxc_netdev_isup().

When we need to know some info about a netdev, such as is_up or not,
we need to read the flag for the netdev.

This patch introduce a interface function named lxc_netdev_isup()
to check is a netdev up or down.

And introduce a network private function named netdev_get_flag()
to get flag for netdev by netlink.

Changelog: 10/15/2015: Return failure if name==NULL to avoid later strlen fun

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/network.c
src/lxc/network.h