2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev: New Function netdev_change_seq().

This new function will provide a much simpler replacement for
netdev_monitor in the future.
This commit is contained in:
Ethan Jackson
2011-05-26 14:28:11 -07:00
parent b7585d1dff
commit ac4d3bcb46
7 changed files with 89 additions and 7 deletions

View File

@@ -1223,6 +1223,19 @@ netdev_dump_queue_stats(const struct netdev *netdev,
: EOPNOTSUPP);
}
/* Returns a sequence number which indicates changes in one of 'netdev''s
* properties. The returned sequence will be nonzero so that callers have a
* value which they may use as a reset when tracking 'netdev'.
*
* The returned sequence number will change whenever 'netdev''s flags,
* features, ethernet address, or carrier changes. It may change for other
* reasons as well, or no reason at all. */
unsigned int
netdev_change_seq(const struct netdev *netdev)
{
return netdev_get_dev(netdev)->netdev_class->change_seq(netdev);
}
/* If 'netdev' is a VLAN network device (e.g. one created with vconfig(8)),
* sets '*vlan_vid' to the VLAN VID associated with that device and returns 0.
* Otherwise returns a errno value (specifically ENOENT if 'netdev_name' is the