Equivalent check for ifstate on VF50 / linux

Trying to find a status of the network state (up or down) in application so we can avoid crashing calling a third party stack init routine. Can’t see something similar to /var/run/ifstate.

The best would probably be to do this through connman as e.g. explained in the following article on our developer website.

Connman allows you to get the state on a higher level (is network properly configured etc.) and allows you to influence network setup too. You can use DBus to get to the configuration objects.

On a lower level you can use sysfs. E.g. to get to the interface state of eth0 you can read the file /sys/class/net/eth0/operstate.