summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-device-ethernet.c
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2013-12-16 16:30:59 +0100
committerJiří Klimeš <jklimes@redhat.com>2013-12-20 11:37:54 +0100
commit567cfa41f4b0524031f0cdca0455c39f8c3c5c69 (patch)
treee4c6ae8f5c5b8ba18bbb085b75f6f9f0c6257392 /libnm-glib/nm-device-ethernet.c
parentf889440b96c254fb9bdd7aea82f628acfad792ee (diff)
downloadNetworkManager-567cfa41f4b0524031f0cdca0455c39f8c3c5c69.tar.gz
libnm-glib: add nm_device_get_hw_address() to NMDevice
It simplifies code getting MAC addresses for clients.
Diffstat (limited to 'libnm-glib/nm-device-ethernet.c')
-rw-r--r--libnm-glib/nm-device-ethernet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libnm-glib/nm-device-ethernet.c b/libnm-glib/nm-device-ethernet.c
index 3831f64cdb..338c498c8b 100644
--- a/libnm-glib/nm-device-ethernet.c
+++ b/libnm-glib/nm-device-ethernet.c
@@ -231,6 +231,12 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro
return NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->connection_compatible (device, connection, error);
}
+static const char *
+get_hw_address (NMDevice *device)
+{
+ return nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device));
+}
+
/***********************************************************/
static void
@@ -331,6 +337,7 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *eth_class)
object_class->finalize = finalize;
object_class->get_property = get_property;
device_class->connection_compatible = connection_compatible;
+ device_class->get_hw_address = get_hw_address;
/* properties */