2
I'm looking for a way to check network state for a 'control panel' site. For the most part it appears that the tree /sys/class/net/*/
has the appropriate information. The confusing part is the operstate
file seems to have three modes:
- up
- down
- unknown
When I first query this for a known working NIC its either 'up' or 'unknown'. If I pull the wire its 'down'. Reconnecting will give 'up'. So why the 'unknown'? And it doesn't work at all for wireless access points - always 'down'.