diff options
Diffstat (limited to 'src/devices/nm-device.h')
-rw-r--r-- | src/devices/nm-device.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h index 358b59af2..f46a64ca2 100644 --- a/src/devices/nm-device.h +++ b/src/devices/nm-device.h @@ -445,8 +445,20 @@ NMLinkType nm_device_get_link_type (NMDevice *dev); NMMetered nm_device_get_metered (NMDevice *dev); int nm_device_get_priority (NMDevice *dev); -guint32 nm_device_get_ip4_route_metric (NMDevice *dev); -guint32 nm_device_get_ip6_route_metric (NMDevice *dev); + +guint32 nm_device_get_ip_route_metric (NMDevice *dev, int addr_family); + +static inline guint32 +nm_device_get_ip4_route_metric (NMDevice *self) +{ + return nm_device_get_ip_route_metric (self, AF_INET); +} + +static inline guint32 +nm_device_get_ip6_route_metric (NMDevice *self) +{ + return nm_device_get_ip_route_metric (self, AF_INET6); +} const char * nm_device_get_hw_address (NMDevice *dev); const char * nm_device_get_permanent_hw_address (NMDevice *self); |