Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
operstate [2018/08/27 08:39] – [netif_carrier_ok()] rpjdayoperstate [2018/08/27 11:07] (current) – [Testing under sysfs] rpjday
Line 66: Line 66:
  
 ==== include/uapi/linux/if.h ==== ==== include/uapi/linux/if.h ====
 +
 +Possible values for ''netdev%%->%%operstate'':
  
 <code> <code>
Line 116: Line 118:
 ===== Testing under sysfs ===== ===== Testing under sysfs =====
  
-Unplugging and plugging:+Unplugging and plugging (administratively, the interface remains UP the whole time):
  
 <code> <code>
Line 201: Line 203:
         struct net_device *netdev = to_net_dev(dev);         struct net_device *netdev = to_net_dev(dev);
  
-        if (netif_running(netdev))  // if IFF_UP, which should be true+        if (netif_running(netdev))  // if __LINK_STATE_START, which should be true
                 return sprintf(buf, fmt_dec, !!netif_carrier_ok(netdev));                 return sprintf(buf, fmt_dec, !!netif_carrier_ok(netdev));
  
  • operstate.1535359161.txt.gz
  • Last modified: 2018/08/27 08:39
  • by rpjday