I'm creating a script for polling information about network interfaces. For this I get some data from
Everything went fine until I wanted to clarify all possible states of an interface (Which are they btw? I'm aware for now only about
unknown). I went through
/usr/src/linux/Documentation/sysfs-rules.txt and found this:
Accessing /sys/class/net/eth0/device is a bug in the application
Is there a reason for this?
Could someone explain me if I'm doing something wrong by getting information from
I don't iterate through all interfaces in
/sysfs but get all network interfaces with
getifaddrs(3). Perhaps there is another method to get iface status?