Location of standard interface flags on SUSE
I am reporting various network statistics in a c++ program by reading the values out of /proc. However, I am having trouble determining the link status. In particular, I am wondering:
1. How are the standard interface flags (IFF_UP, IFF_RUNNING) as referenced in if.h accessed from user land? The ifconfig man page lists its files as
/proc/net/socket (doesn't exist in suse), /proc/net/dev, and /proc/net/if_inet6. None of these seem to contain these flags.
2. ip link show reports a "NO-CARRIER" flag. How does this correlate with the "UP" and/or "RUNNING" flags as reported by ifconfig, and how is it accessed from user space?
Any help is appreciated.
Thanks in advance.
For anyone who is wondering, /sys/class/net/[NIC]/carrier has the information I was looking for in #2.
|All times are GMT -5. The time now is 02:29 AM.|