int
netdev_get_carrier(const struct netdev *netdev, bool *carrier)
+{
+ return netdev_nodev_get_carrier(netdev->name, carrier);
+}
+
+int
+netdev_nodev_get_carrier(const char *netdev_name, bool *carrier)
{
char line[8];
int retval;
*carrier = false;
- fn = xasprintf("/sys/class/net/%s/carrier", netdev->name);
+ fn = xasprintf("/sys/class/net/%s/carrier", netdev_name);
fd = open(fn, O_RDONLY);
if (fd < 0) {
error = errno;
int netdev_nodev_get_etheraddr(const char *netdev_name, uint8_t mac[6]);
int netdev_nodev_set_policing(const char *netdev_name, uint32_t kbits_rate,
uint32_t kbits_burst);
+int netdev_nodev_get_carrier(const char *netdev_name, bool *carrier);
int netdev_get_vlan_vid(const char *netdev_name, int *vlan_vid);