]> git.proxmox.com Git - mirror_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)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 15 Oct 2014 10:01:59 +0000 (12:01 +0200)
commitefa1cf45a23c450b4566705f2fe46fc22a0a6482
tree9b999b7a42144496bd861e9d2b8fd2f63069f8a0
parent8d357196c4bebe2e77bfa545336dc24bd7b9039d
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