NetworkManager r3741 - in trunk: . callouts include introspection libnm-glib src src/backends system-settings/plugins/ifcfg-fedora system-settings/plugins/ifcfg-suse system-settings/src test
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3741 - in trunk: . callouts include introspection libnm-glib src src/backends system-settings/plugins/ifcfg-fedora system-settings/plugins/ifcfg-suse system-settings/src test
- Date: Tue, 10 Jun 2008 15:54:23 +0000 (UTC)
Author: dcbw
Date: Tue Jun 10 15:54:23 2008
New Revision: 3741
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3741&view=rev
Log:
2008-06-10 Dan Williams <dcbw redhat com>
The grand 802-3-ethernet rename. Get rid of the 802-3/8023/802_3 bits.
Added:
trunk/introspection/nm-device-ethernet.xml
- copied unchanged from r3739, /trunk/introspection/nm-device-802-3-ethernet.xml
trunk/libnm-glib/nm-device-ethernet.c
- copied, changed from r3739, /trunk/libnm-glib/nm-device-802-3-ethernet.c
trunk/libnm-glib/nm-device-ethernet.h
- copied, changed from r3739, /trunk/libnm-glib/nm-device-802-3-ethernet.h
trunk/src/nm-device-ethernet.c
- copied, changed from r3739, /trunk/src/nm-device-802-3-ethernet.c
trunk/src/nm-device-ethernet.h
- copied, changed from r3739, /trunk/src/nm-device-802-3-ethernet.h
Removed:
trunk/introspection/nm-device-802-3-ethernet.xml
trunk/libnm-glib/nm-device-802-3-ethernet.c
trunk/libnm-glib/nm-device-802-3-ethernet.h
trunk/src/nm-device-802-3-ethernet.c
trunk/src/nm-device-802-3-ethernet.h
Modified:
trunk/ChangeLog
trunk/callouts/nm-dispatcher-action.c
trunk/include/NetworkManager.h
trunk/introspection/Makefile.am
trunk/libnm-glib/Makefile.am
trunk/libnm-glib/libnm-glib-test.c
trunk/libnm-glib/nm-client.c
trunk/libnm-glib/nm-device.c
trunk/src/Makefile.am
trunk/src/NetworkManager.c
trunk/src/NetworkManagerPolicy.c
trunk/src/NetworkManagerUtils.c
trunk/src/autoip.c
trunk/src/backends/NetworkManagerArch.c
trunk/src/backends/NetworkManagerDebian.c
trunk/src/backends/NetworkManagerFrugalware.c
trunk/src/backends/NetworkManagerGeneric.c
trunk/src/backends/NetworkManagerGentoo.c
trunk/src/backends/NetworkManagerMandriva.c
trunk/src/backends/NetworkManagerPaldo.c
trunk/src/backends/NetworkManagerRedHat.c
trunk/src/backends/NetworkManagerSlackware.c
trunk/src/backends/NetworkManagerSuSE.c
trunk/src/nm-cdma-device.c
trunk/src/nm-device-802-11-wireless.c
trunk/src/nm-device-interface.c
trunk/src/nm-device.c
trunk/src/nm-gsm-device.c
trunk/src/nm-hal-manager.c
trunk/system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
trunk/system-settings/plugins/ifcfg-suse/parser.c
trunk/system-settings/plugins/ifcfg-suse/plugin.c
trunk/system-settings/src/main.c
trunk/system-settings/src/nm-system-config-hal-manager.c
trunk/test/nm-tool.c
trunk/test/nmtestdevices.c
Modified: trunk/callouts/nm-dispatcher-action.c
==============================================================================
--- trunk/callouts/nm-dispatcher-action.c (original)
+++ trunk/callouts/nm-dispatcher-action.c Tue Jun 10 15:54:23 2008
@@ -302,7 +302,7 @@
NMConnection *connection;
char *iface = NULL;
char *parent_iface = NULL;
- NMDeviceType type = DEVICE_TYPE_UNKNOWN;
+ NMDeviceType type = NM_DEVICE_TYPE_UNKNOWN;
GValue *value;
/* Back off the quit timeout */
Modified: trunk/include/NetworkManager.h
==============================================================================
--- trunk/include/NetworkManager.h (original)
+++ trunk/include/NetworkManager.h Tue Jun 10 15:54:23 2008
@@ -70,13 +70,20 @@
*/
typedef enum NMDeviceType
{
- DEVICE_TYPE_UNKNOWN = 0,
- DEVICE_TYPE_802_3_ETHERNET,
- DEVICE_TYPE_802_11_WIRELESS,
- DEVICE_TYPE_GSM,
- DEVICE_TYPE_CDMA
+ NM_DEVICE_TYPE_UNKNOWN = 0,
+ NM_DEVICE_TYPE_ETHERNET,
+ NM_DEVICE_TYPE_WIFI,
+ NM_DEVICE_TYPE_GSM,
+ NM_DEVICE_TYPE_CDMA
} NMDeviceType;
+/* DEPRECATED TYPE NAMES */
+#define DEVICE_TYPE_UNKNOWN NM_DEVICE_TYPE_UNKNOWN
+#define DEVICE_TYPE_802_3_ETHERNET NM_DEVICE_TYPE_ETHERNET
+#define DEVICE_TYPE_802_11_WIRELESS NM_DEVICE_TYPE_WIFI
+#define DEVICE_TYPE_GSM NM_DEVICE_TYPE_GSM
+#define DEVICE_TYPE_CDMA NM_DEVICE_TYPE_CDMA
+
/*
* General device capability bits
Modified: trunk/introspection/Makefile.am
==============================================================================
--- trunk/introspection/Makefile.am (original)
+++ trunk/introspection/Makefile.am Tue Jun 10 15:54:23 2008
@@ -1,7 +1,7 @@
EXTRA_DIST = \
nm-access-point.xml \
nm-device-802-11-wireless.xml \
- nm-device-802-3-ethernet.xml \
+ nm-device-ethernet.xml \
nm-device-cdma.xml \
nm-device-gsm.xml \
nm-device-serial.xml \
Modified: trunk/libnm-glib/Makefile.am
==============================================================================
--- trunk/libnm-glib/Makefile.am (original)
+++ trunk/libnm-glib/Makefile.am Tue Jun 10 15:54:23 2008
@@ -7,7 +7,7 @@
nm-access-point-bindings.h \
nm-client-bindings.h \
nm-device-bindings.h \
- nm-device-802-3-ethernet-bindings.h \
+ nm-device-ethernet-bindings.h \
nm-device-802-11-wireless-bindings.h \
nm-exported-connection-glue.h \
nm-exported-connection-bindings.h \
@@ -34,7 +34,7 @@
nm-object.h \
nm-client.h \
nm-device.h \
- nm-device-802-3-ethernet.h \
+ nm-device-ethernet.h \
nm-device-802-11-wireless.h \
nm-access-point.h \
nm-ip4-config.h \
@@ -59,7 +59,7 @@
nm-dbus-utils.h \
nm-device.c \
nm-device-private.h \
- nm-device-802-3-ethernet.c \
+ nm-device-ethernet.c \
nm-device-802-11-wireless.c \
nm-access-point.c \
nm-ip4-config.c \
@@ -103,8 +103,8 @@
nm-device-bindings.h: $(top_srcdir)/introspection/nm-device.xml
dbus-binding-tool --prefix=nm_device --mode=glib-client --output=nm-device-bindings.h $(top_srcdir)/introspection/nm-device.xml
-nm-device-802-3-ethernet-bindings.h: $(top_srcdir)/introspection/nm-device-802-3-ethernet.xml
- dbus-binding-tool --prefix=nm_device_802_3_ethernet --mode=glib-client --output=nm-device-802-3-ethernet-bindings.h $(top_srcdir)/introspection/nm-device-802-3-ethernet.xml
+nm-device-ethernet-bindings.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
+ dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-client --output=nm-device-ethernet-bindings.h $(top_srcdir)/introspection/nm-device-ethernet.xml
nm-device-802-11-wireless-bindings.h: $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
dbus-binding-tool --prefix=nm_device_802_11_wireless --mode=glib-client --output=nm-device-802-11-wireless-bindings.h $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
Modified: trunk/libnm-glib/libnm-glib-test.c
==============================================================================
--- trunk/libnm-glib/libnm-glib-test.c (original)
+++ trunk/libnm-glib/libnm-glib-test.c Tue Jun 10 15:54:23 2008
@@ -9,7 +9,7 @@
#include "nm-client.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
#include "nm-active-connection.h"
@@ -158,13 +158,13 @@
}
static void
-dump_wired (NMDevice8023Ethernet *device)
+dump_wired (NMDeviceEthernet *device)
{
const char *str;
- g_print ("Speed: %d\n", nm_device_802_3_ethernet_get_speed (device));
+ g_print ("Speed: %d\n", nm_device_ethernet_get_speed (device));
- str = nm_device_802_3_ethernet_get_hw_address (device);
+ str = nm_device_ethernet_get_hw_address (device);
g_print ("MAC: %s\n", str);
}
@@ -195,8 +195,8 @@
if (state == NM_DEVICE_STATE_ACTIVATED)
dump_ip4_config (nm_device_get_ip4_config (device));
- if (NM_IS_DEVICE_802_3_ETHERNET (device))
- dump_wired (NM_DEVICE_802_3_ETHERNET (device));
+ if (NM_IS_DEVICE_ETHERNET (device))
+ dump_wired (NM_DEVICE_ETHERNET (device));
else if (NM_IS_DEVICE_802_11_WIRELESS (device))
dump_wireless (NM_DEVICE_802_11_WIRELESS (device));
}
Modified: trunk/libnm-glib/nm-client.c
==============================================================================
--- trunk/libnm-glib/nm-client.c (original)
+++ trunk/libnm-glib/nm-client.c Tue Jun 10 15:54:23 2008
@@ -5,7 +5,7 @@
#include <nm-utils.h>
#include "nm-client.h"
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-device-802-11-wireless.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
Copied: trunk/libnm-glib/nm-device-ethernet.c (from r3739, /trunk/libnm-glib/nm-device-802-3-ethernet.c)
==============================================================================
--- /trunk/libnm-glib/nm-device-802-3-ethernet.c (original)
+++ trunk/libnm-glib/nm-device-ethernet.c Tue Jun 10 15:54:23 2008
@@ -1,12 +1,12 @@
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-device-private.h"
#include "nm-object-private.h"
-#include "nm-device-802-3-ethernet-bindings.h"
+#include "nm-device-ethernet-bindings.h"
-G_DEFINE_TYPE (NMDevice8023Ethernet, nm_device_802_3_ethernet, NM_TYPE_DEVICE)
+G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
-#define NM_DEVICE_802_3_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023EthernetPrivate))
+#define NM_DEVICE_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetPrivate))
typedef struct {
DBusGProxy *proxy;
@@ -17,7 +17,7 @@
gboolean carrier_valid;
gboolean disposed;
-} NMDevice8023EthernetPrivate;
+} NMDeviceEthernetPrivate;
enum {
PROP_0,
@@ -33,25 +33,25 @@
#define DBUS_PROP_CARRIER "Carrier"
GObject *
-nm_device_802_3_ethernet_new (DBusGConnection *connection, const char *path)
+nm_device_ethernet_new (DBusGConnection *connection, const char *path)
{
g_return_val_if_fail (connection != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
- return g_object_new (NM_TYPE_DEVICE_802_3_ETHERNET,
+ return g_object_new (NM_TYPE_DEVICE_ETHERNET,
NM_OBJECT_DBUS_CONNECTION, connection,
NM_OBJECT_DBUS_PATH, path,
NULL);
}
const char *
-nm_device_802_3_ethernet_get_hw_address (NMDevice8023Ethernet *device)
+nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
{
- NMDevice8023EthernetPrivate *priv;
+ NMDeviceEthernetPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_802_3_ETHERNET (device), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), NULL);
- priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device);
+ priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
if (!priv->hw_address) {
priv->hw_address = nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
@@ -62,13 +62,13 @@
}
guint32
-nm_device_802_3_ethernet_get_speed (NMDevice8023Ethernet *device)
+nm_device_ethernet_get_speed (NMDeviceEthernet *device)
{
- NMDevice8023EthernetPrivate *priv;
+ NMDeviceEthernetPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_802_3_ETHERNET (device), 0);
+ g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), 0);
- priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device);
+ priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
if (!priv->speed) {
priv->speed = nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
@@ -79,13 +79,13 @@
}
gboolean
-nm_device_802_3_ethernet_get_carrier (NMDevice8023Ethernet *device)
+nm_device_ethernet_get_carrier (NMDeviceEthernet *device)
{
- NMDevice8023EthernetPrivate *priv;
+ NMDeviceEthernetPrivate *priv;
- g_return_val_if_fail (NM_IS_DEVICE_802_3_ETHERNET (device), FALSE);
+ g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), FALSE);
- priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device);
+ priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
if (!priv->carrier_valid) {
priv->carrier = nm_object_get_boolean_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
@@ -97,9 +97,9 @@
}
static void
-nm_device_802_3_ethernet_init (NMDevice8023Ethernet *device)
+nm_device_ethernet_init (NMDeviceEthernet *device)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
priv->disposed = FALSE;
priv->carrier = FALSE;
@@ -107,13 +107,13 @@
}
static void
-register_for_property_changed (NMDevice8023Ethernet *device)
+register_for_property_changed (NMDeviceEthernet *device)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DEVICE_802_3_ETHERNET_HW_ADDRESS, nm_object_demarshal_generic, &priv->hw_address },
- { NM_DEVICE_802_3_ETHERNET_SPEED, nm_object_demarshal_generic, &priv->speed },
- { NM_DEVICE_802_3_ETHERNET_CARRIER, nm_object_demarshal_generic, &priv->carrier },
+ { NM_DEVICE_ETHERNET_HW_ADDRESS, nm_object_demarshal_generic, &priv->hw_address },
+ { NM_DEVICE_ETHERNET_SPEED, nm_object_demarshal_generic, &priv->speed },
+ { NM_DEVICE_ETHERNET_CARRIER, nm_object_demarshal_generic, &priv->carrier },
{ NULL },
};
@@ -128,22 +128,22 @@
GObjectConstructParam *construct_params)
{
GObject *object;
- NMDevice8023EthernetPrivate *priv;
+ NMDeviceEthernetPrivate *priv;
- object = G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->constructor (type,
+ object = G_OBJECT_CLASS (nm_device_ethernet_parent_class)->constructor (type,
n_construct_params,
construct_params);
if (!object)
return NULL;
- priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (object);
+ priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object);
priv->proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (object)),
NM_DBUS_SERVICE,
nm_object_get_path (NM_OBJECT (object)),
NM_DBUS_INTERFACE_DEVICE_WIRED);
- register_for_property_changed (NM_DEVICE_802_3_ETHERNET (object));
+ register_for_property_changed (NM_DEVICE_ETHERNET (object));
return object;
}
@@ -151,10 +151,10 @@
static void
dispose (GObject *object)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (object);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object);
if (priv->disposed) {
- G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_ethernet_parent_class)->dispose (object);
return;
}
@@ -162,18 +162,18 @@
g_object_unref (priv->proxy);
- G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_ethernet_parent_class)->dispose (object);
}
static void
finalize (GObject *object)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (object);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object);
if (priv->hw_address)
g_free (priv->hw_address);
- G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->finalize (object);
+ G_OBJECT_CLASS (nm_device_ethernet_parent_class)->finalize (object);
}
static void
@@ -182,17 +182,17 @@
GValue *value,
GParamSpec *pspec)
{
- NMDevice8023Ethernet *device = NM_DEVICE_802_3_ETHERNET (object);
+ NMDeviceEthernet *device = NM_DEVICE_ETHERNET (object);
switch (prop_id) {
case PROP_HW_ADDRESS:
- g_value_set_string (value, nm_device_802_3_ethernet_get_hw_address (device));
+ g_value_set_string (value, nm_device_ethernet_get_hw_address (device));
break;
case PROP_SPEED:
- g_value_set_uint (value, nm_device_802_3_ethernet_get_speed (device));
+ g_value_set_uint (value, nm_device_ethernet_get_speed (device));
break;
case PROP_CARRIER:
- g_value_set_boolean (value, nm_device_802_3_ethernet_get_carrier (device));
+ g_value_set_boolean (value, nm_device_ethernet_get_carrier (device));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -201,11 +201,11 @@
}
static void
-nm_device_802_3_ethernet_class_init (NMDevice8023EthernetClass *device_class)
+nm_device_ethernet_class_init (NMDeviceEthernetClass *device_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (device_class);
- g_type_class_add_private (device_class, sizeof (NMDevice8023EthernetPrivate));
+ g_type_class_add_private (device_class, sizeof (NMDeviceEthernetPrivate));
/* virtual methods */
object_class->constructor = constructor;
@@ -216,7 +216,7 @@
/* properties */
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
- g_param_spec_string (NM_DEVICE_802_3_ETHERNET_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_ETHERNET_HW_ADDRESS,
"MAC Address",
"Hardware MAC address",
NULL,
@@ -224,7 +224,7 @@
g_object_class_install_property
(object_class, PROP_SPEED,
- g_param_spec_uint (NM_DEVICE_802_3_ETHERNET_SPEED,
+ g_param_spec_uint (NM_DEVICE_ETHERNET_SPEED,
"Speed",
"Speed",
0, G_MAXUINT32, 0,
@@ -232,7 +232,7 @@
g_object_class_install_property
(object_class, PROP_CARRIER,
- g_param_spec_boolean (NM_DEVICE_802_3_ETHERNET_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_ETHERNET_CARRIER,
"Carrier",
"Carrier",
FALSE,
Copied: trunk/libnm-glib/nm-device-ethernet.h (from r3739, /trunk/libnm-glib/nm-device-802-3-ethernet.h)
==============================================================================
--- /trunk/libnm-glib/nm-device-802-3-ethernet.h (original)
+++ trunk/libnm-glib/nm-device-ethernet.h Tue Jun 10 15:54:23 2008
@@ -1,37 +1,37 @@
-#ifndef NM_DEVICE_802_3_ETHERNET_H
-#define NM_DEVICE_802_3_ETHERNET_H
+#ifndef NM_DEVICE_ETHERNET_H
+#define NM_DEVICE_ETHERNET_H
#include "nm-device.h"
G_BEGIN_DECLS
-#define NM_TYPE_DEVICE_802_3_ETHERNET (nm_device_802_3_ethernet_get_type ())
-#define NM_DEVICE_802_3_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023Ethernet))
-#define NM_DEVICE_802_3_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023EthernetClass))
-#define NM_IS_DEVICE_802_3_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_802_3_ETHERNET))
-#define NM_IS_DEVICE_802_3_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_802_3_ETHERNET))
-#define NM_DEVICE_802_3_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023EthernetClass))
-
-#define NM_DEVICE_802_3_ETHERNET_HW_ADDRESS "hw-address"
-#define NM_DEVICE_802_3_ETHERNET_SPEED "speed"
-#define NM_DEVICE_802_3_ETHERNET_CARRIER "carrier"
+#define NM_TYPE_DEVICE_ETHERNET (nm_device_ethernet_get_type ())
+#define NM_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernet))
+#define NM_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
+#define NM_IS_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_ETHERNET))
+#define NM_IS_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_ETHERNET))
+#define NM_DEVICE_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
+
+#define NM_DEVICE_ETHERNET_HW_ADDRESS "hw-address"
+#define NM_DEVICE_ETHERNET_SPEED "speed"
+#define NM_DEVICE_ETHERNET_CARRIER "carrier"
typedef struct {
NMDevice parent;
-} NMDevice8023Ethernet;
+} NMDeviceEthernet;
typedef struct {
NMDeviceClass parent;
-} NMDevice8023EthernetClass;
+} NMDeviceEthernetClass;
-GType nm_device_802_3_ethernet_get_type (void);
+GType nm_device_ethernet_get_type (void);
-GObject *nm_device_802_3_ethernet_new (DBusGConnection *connection, const char *path);
+GObject *nm_device_ethernet_new (DBusGConnection *connection, const char *path);
-const char * nm_device_802_3_ethernet_get_hw_address (NMDevice8023Ethernet *device);
-guint32 nm_device_802_3_ethernet_get_speed (NMDevice8023Ethernet *device);
-gboolean nm_device_802_3_ethernet_get_carrier (NMDevice8023Ethernet *device);
+const char * nm_device_ethernet_get_hw_address (NMDeviceEthernet *device);
+guint32 nm_device_ethernet_get_speed (NMDeviceEthernet *device);
+gboolean nm_device_ethernet_get_carrier (NMDeviceEthernet *device);
G_END_DECLS
-#endif /* NM_DEVICE_802_3_ETHERNET_H */
+#endif /* NM_DEVICE_ETHERNET_H */
Modified: trunk/libnm-glib/nm-device.c
==============================================================================
--- trunk/libnm-glib/nm-device.c (original)
+++ trunk/libnm-glib/nm-device.c Tue Jun 10 15:54:23 2008
@@ -1,7 +1,7 @@
#include <string.h>
#include "NetworkManager.h"
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-device-802-11-wireless.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
@@ -338,16 +338,16 @@
}
switch (g_value_get_uint (&value)) {
- case DEVICE_TYPE_802_3_ETHERNET:
- dtype = NM_TYPE_DEVICE_802_3_ETHERNET;
+ case NM_DEVICE_TYPE_ETHERNET:
+ dtype = NM_TYPE_DEVICE_ETHERNET;
break;
- case DEVICE_TYPE_802_11_WIRELESS:
+ case NM_DEVICE_TYPE_WIFI:
dtype = NM_TYPE_DEVICE_802_11_WIRELESS;
break;
- case DEVICE_TYPE_GSM:
+ case NM_DEVICE_TYPE_GSM:
dtype = NM_TYPE_GSM_DEVICE;
break;
- case DEVICE_TYPE_CDMA:
+ case NM_DEVICE_TYPE_CDMA:
dtype = NM_TYPE_CDMA_DEVICE;
break;
default:
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Tue Jun 10 15:54:23 2008
@@ -28,8 +28,8 @@
nm-device-interface.c \
nm-device-interface.h \
nm-device-private.h \
- nm-device-802-3-ethernet.c \
- nm-device-802-3-ethernet.h \
+ nm-device-ethernet.c \
+ nm-device-ethernet.h \
nm-device-802-11-wireless.c \
nm-device-802-11-wireless.h \
NetworkManagerAP.c \
@@ -81,8 +81,8 @@
nm-device-interface-glue.h: $(top_srcdir)/introspection/nm-device.xml
dbus-binding-tool --prefix=nm_device_interface --mode=glib-server --output=nm-device-interface-glue.h $(top_srcdir)/introspection/nm-device.xml
-nm-device-802-3-ethernet-glue.h: $(top_srcdir)/introspection/nm-device-802-3-ethernet.xml
- dbus-binding-tool --prefix=nm_device_802_3_ethernet --mode=glib-server --output=nm-device-802-3-ethernet-glue.h $(top_srcdir)/introspection/nm-device-802-3-ethernet.xml
+nm-device-ethernet-glue.h: $(top_srcdir)/introspection/nm-device-ethernet.xml
+ dbus-binding-tool --prefix=nm_device_ethernet --mode=glib-server --output=nm-device-ethernet-glue.h $(top_srcdir)/introspection/nm-device-ethernet.xml
nm-device-802-11-wireless-glue.h: $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
dbus-binding-tool --prefix=nm_device_802_11_wireless --mode=glib-server --output=nm-device-802-11-wireless-glue.h $(top_srcdir)/introspection/nm-device-802-11-wireless.xml
@@ -106,7 +106,7 @@
nm-access-point-glue.h \
nm-manager-glue.h \
nm-device-interface-glue.h \
- nm-device-802-3-ethernet-glue.h \
+ nm-device-ethernet-glue.h \
nm-device-802-11-wireless-glue.h \
nm-serial-device-glue.h \
nm-cdma-device-glue.h \
Modified: trunk/src/NetworkManager.c
==============================================================================
--- trunk/src/NetworkManager.c (original)
+++ trunk/src/NetworkManager.c Tue Jun 10 15:54:23 2008
@@ -41,11 +41,7 @@
#include "NetworkManager.h"
#include "nm-utils.h"
#include "NetworkManagerUtils.h"
-#include "nm-device-interface.h"
#include "nm-manager.h"
-#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "NetworkManagerPolicy.h"
#include "NetworkManagerSystem.h"
#include "nm-named-manager.h"
Modified: trunk/src/NetworkManagerPolicy.c
==============================================================================
--- trunk/src/NetworkManagerPolicy.c (original)
+++ trunk/src/NetworkManagerPolicy.c Tue Jun 10 15:54:23 2008
@@ -40,7 +40,7 @@
#include "nm-device-interface.h"
#include "nm-device.h"
#include "nm-device-802-11-wireless.h"
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
#include "nm-dbus-manager.h"
@@ -108,7 +108,7 @@
if (NM_IS_DEVICE_802_11_WIRELESS (dev))
return 4;
- if (NM_IS_DEVICE_802_3_ETHERNET (dev))
+ if (NM_IS_DEVICE_ETHERNET (dev))
return 5;
return 1;
Modified: trunk/src/NetworkManagerUtils.c
==============================================================================
--- trunk/src/NetworkManagerUtils.c (original)
+++ trunk/src/NetworkManagerUtils.c Tue Jun 10 15:54:23 2008
@@ -29,7 +29,7 @@
#include "nm-utils.h"
#include "nm-device.h"
#include "nm-device-802-11-wireless.h"
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-dbus-manager.h"
#include "nm-dispatcher-action.h"
#include "nm-dbus-glib-types.h"
@@ -118,7 +118,7 @@
return;
}
- if (NM_IS_DEVICE_802_3_ETHERNET (dev)) {
+ if (NM_IS_DEVICE_ETHERNET (dev)) {
if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT)) {
nm_info ("%s: Driver '%s' does not support carrier detection.\n"
"\tYou must switch to it manually.",
Modified: trunk/src/autoip.c
==============================================================================
--- trunk/src/autoip.c (original)
+++ trunk/src/autoip.c Tue Jun 10 15:54:23 2008
@@ -31,7 +31,7 @@
#include <unistd.h>
#include "NetworkManager.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-device-802-11-wireless.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
@@ -225,8 +225,8 @@
memset (&saddr, 0, sizeof (saddr));
strncpy (saddr.sa_data, iface, sizeof (saddr.sa_data));
- if (NM_IS_DEVICE_802_3_ETHERNET (dev))
- nm_device_802_3_ethernet_get_address (NM_DEVICE_802_3_ETHERNET (dev), &addr);
+ if (NM_IS_DEVICE_ETHERNET (dev))
+ nm_device_ethernet_get_address (NM_DEVICE_ETHERNET (dev), &addr);
else if (NM_IS_DEVICE_802_11_WIRELESS (dev))
nm_device_802_11_wireless_get_address (NM_DEVICE_802_11_WIRELESS (dev), &addr);
else
Modified: trunk/src/backends/NetworkManagerArch.c
==============================================================================
--- trunk/src/backends/NetworkManagerArch.c (original)
+++ trunk/src/backends/NetworkManagerArch.c Tue Jun 10 15:54:23 2008
@@ -49,8 +49,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "interface_parser.h"
#include "nm-utils.h"
Modified: trunk/src/backends/NetworkManagerDebian.c
==============================================================================
--- trunk/src/backends/NetworkManagerDebian.c (original)
+++ trunk/src/backends/NetworkManagerDebian.c Tue Jun 10 15:54:23 2008
@@ -38,8 +38,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "interface_parser.h"
#include "nm-utils.h"
Modified: trunk/src/backends/NetworkManagerFrugalware.c
==============================================================================
--- trunk/src/backends/NetworkManagerFrugalware.c (original)
+++ trunk/src/backends/NetworkManagerFrugalware.c Tue Jun 10 15:54:23 2008
@@ -33,8 +33,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
// Provided by the frugalwareutils package on Frugalware
Modified: trunk/src/backends/NetworkManagerGeneric.c
==============================================================================
--- trunk/src/backends/NetworkManagerGeneric.c (original)
+++ trunk/src/backends/NetworkManagerGeneric.c Tue Jun 10 15:54:23 2008
@@ -35,8 +35,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
#include "nm-netlink.h"
Modified: trunk/src/backends/NetworkManagerGentoo.c
==============================================================================
--- trunk/src/backends/NetworkManagerGentoo.c (original)
+++ trunk/src/backends/NetworkManagerGentoo.c Tue Jun 10 15:54:23 2008
@@ -38,8 +38,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
#include "shvar.h"
Modified: trunk/src/backends/NetworkManagerMandriva.c
==============================================================================
--- trunk/src/backends/NetworkManagerMandriva.c (original)
+++ trunk/src/backends/NetworkManagerMandriva.c Tue Jun 10 15:54:23 2008
@@ -36,8 +36,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
#include "shvar.h"
Modified: trunk/src/backends/NetworkManagerPaldo.c
==============================================================================
--- trunk/src/backends/NetworkManagerPaldo.c (original)
+++ trunk/src/backends/NetworkManagerPaldo.c Tue Jun 10 15:54:23 2008
@@ -38,8 +38,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
/*
Modified: trunk/src/backends/NetworkManagerRedHat.c
==============================================================================
--- trunk/src/backends/NetworkManagerRedHat.c (original)
+++ trunk/src/backends/NetworkManagerRedHat.c Tue Jun 10 15:54:23 2008
@@ -34,8 +34,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
#include "shvar.h"
Modified: trunk/src/backends/NetworkManagerSlackware.c
==============================================================================
--- trunk/src/backends/NetworkManagerSlackware.c (original)
+++ trunk/src/backends/NetworkManagerSlackware.c Tue Jun 10 15:54:23 2008
@@ -34,8 +34,6 @@
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-device.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
/*
Modified: trunk/src/backends/NetworkManagerSuSE.c
==============================================================================
--- trunk/src/backends/NetworkManagerSuSE.c (original)
+++ trunk/src/backends/NetworkManagerSuSE.c Tue Jun 10 15:54:23 2008
@@ -43,8 +43,6 @@
#include "NetworkManagerUtils.h"
#include "nm-device.h"
#include "NetworkManagerPolicy.h"
-#include "nm-device-802-3-ethernet.h"
-#include "nm-device-802-11-wireless.h"
#include "nm-utils.h"
#include "shvar.h"
Modified: trunk/src/nm-cdma-device.c
==============================================================================
--- trunk/src/nm-cdma-device.c (original)
+++ trunk/src/nm-cdma-device.c Tue Jun 10 15:54:23 2008
@@ -357,7 +357,7 @@
static void
nm_cdma_device_init (NMCdmaDevice *self)
{
- nm_device_set_device_type (NM_DEVICE (self), DEVICE_TYPE_CDMA);
+ nm_device_set_device_type (NM_DEVICE (self), NM_DEVICE_TYPE_CDMA);
}
static gboolean
Modified: trunk/src/nm-device-802-11-wireless.c
==============================================================================
--- trunk/src/nm-device-802-11-wireless.c (original)
+++ trunk/src/nm-device-802-11-wireless.c Tue Jun 10 15:54:23 2008
@@ -414,7 +414,7 @@
memset (&(self->priv->hw_addr), 0, sizeof (struct ether_addr));
- nm_device_set_device_type (NM_DEVICE (self), DEVICE_TYPE_802_11_WIRELESS);
+ nm_device_set_device_type (NM_DEVICE (self), NM_DEVICE_TYPE_WIFI);
}
static guint32 iw_freq_to_uint32 (struct iw_freq *freq)
Copied: trunk/src/nm-device-ethernet.c (from r3739, /trunk/src/nm-device-802-3-ethernet.c)
==============================================================================
--- /trunk/src/nm-device-802-3-ethernet.c (original)
+++ trunk/src/nm-device-ethernet.c Tue Jun 10 15:54:23 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
@@ -34,7 +34,7 @@
#include <net/if.h>
#include <errno.h>
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-device-interface.h"
#include "nm-device-private.h"
#include "nm-activation-request.h"
@@ -53,12 +53,12 @@
#include "nm-utils.h"
#include "nm-properties-changed-signal.h"
-#include "nm-device-802-3-ethernet-glue.h"
+#include "nm-device-ethernet-glue.h"
-G_DEFINE_TYPE (NMDevice8023Ethernet, nm_device_802_3_ethernet, NM_TYPE_DEVICE)
+G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
-#define NM_DEVICE_802_3_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023EthernetPrivate))
+#define NM_DEVICE_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetPrivate))
#define WIRED_SECRETS_TRIES "wired-secrets-tries"
@@ -102,7 +102,7 @@
/* PPPoE */
NMPPPManager *ppp_manager;
NMIP4Config *pending_ip4_config;
-} NMDevice8023EthernetPrivate;
+} NMDeviceEthernetPrivate;
enum {
PROPERTIES_CHANGED,
@@ -122,8 +122,8 @@
};
-static gboolean supports_mii_carrier_detect (NMDevice8023Ethernet *dev);
-static gboolean supports_ethtool_carrier_detect (NMDevice8023Ethernet *dev);
+static gboolean supports_mii_carrier_detect (NMDeviceEthernet *dev);
+static gboolean supports_ethtool_carrier_detect (NMDeviceEthernet *dev);
static GQuark
nm_ethernet_error_quark (void)
@@ -158,19 +158,19 @@
}
static void
-set_carrier (NMDevice8023Ethernet *self, const gboolean carrier)
+set_carrier (NMDeviceEthernet *self, const gboolean carrier)
{
- NMDevice8023EthernetPrivate *priv;
+ NMDeviceEthernetPrivate *priv;
NMDeviceState state;
g_return_if_fail (NM_IS_DEVICE (self));
- priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
if (priv->carrier == carrier)
return;
priv->carrier = carrier;
- g_object_notify (G_OBJECT (self), NM_DEVICE_802_3_ETHERNET_CARRIER);
+ g_object_notify (G_OBJECT (self), NM_DEVICE_ETHERNET_CARRIER);
state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
nm_info ("(%s): carrier now %s (device state %d)", nm_device_get_iface (NM_DEVICE (self)), carrier ? "ON" : "OFF", state);
@@ -184,7 +184,7 @@
}
static void
-nm_device_802_3_ethernet_carrier_on (NMNetlinkMonitor *monitor,
+nm_device_ethernet_carrier_on (NMNetlinkMonitor *monitor,
int idx,
gpointer user_data)
{
@@ -198,12 +198,12 @@
if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT))
return;
- set_carrier (NM_DEVICE_802_3_ETHERNET (dev), TRUE);
+ set_carrier (NM_DEVICE_ETHERNET (dev), TRUE);
}
}
static void
-nm_device_802_3_ethernet_carrier_off (NMNetlinkMonitor *monitor,
+nm_device_ethernet_carrier_off (NMNetlinkMonitor *monitor,
int idx,
gpointer user_data)
{
@@ -217,7 +217,7 @@
if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT))
return;
- set_carrier (NM_DEVICE_802_3_ETHERNET (dev), FALSE);
+ set_carrier (NM_DEVICE_ETHERNET (dev), FALSE);
}
}
@@ -231,8 +231,8 @@
static void
device_state_changed (NMDeviceInterface *device, NMDeviceState state, gpointer user_data)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (user_data);
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
/* Remove any previous delayed transition to disconnected */
if (priv->state_to_disconnected_id) {
@@ -256,18 +256,18 @@
GObjectConstructParam *construct_params)
{
GObject *object;
- NMDevice8023EthernetPrivate * priv;
+ NMDeviceEthernetPrivate * priv;
NMDevice * dev;
guint32 caps;
- object = G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->constructor (type,
+ object = G_OBJECT_CLASS (nm_device_ethernet_parent_class)->constructor (type,
n_construct_params,
construct_params);
if (!object)
return NULL;
dev = NM_DEVICE (object);
- priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (dev);
+ priv = NM_DEVICE_ETHERNET_GET_PRIVATE (dev);
priv->carrier_file_path = g_strdup_printf ("/sys/class/net/%s/carrier",
nm_device_get_iface (dev));
@@ -280,10 +280,10 @@
NMNetlinkMonitor * monitor = nm_netlink_monitor_get ();
priv->link_connected_id = g_signal_connect (monitor, "carrier-on",
- G_CALLBACK (nm_device_802_3_ethernet_carrier_on),
+ G_CALLBACK (nm_device_ethernet_carrier_on),
dev);
priv->link_disconnected_id = g_signal_connect (monitor, "carrier-off",
- G_CALLBACK (nm_device_802_3_ethernet_carrier_off),
+ G_CALLBACK (nm_device_ethernet_carrier_off),
dev);
if (!nm_netlink_monitor_request_status (monitor, &error)) {
@@ -304,22 +304,22 @@
}
static void
-nm_device_802_3_ethernet_init (NMDevice8023Ethernet * self)
+nm_device_ethernet_init (NMDeviceEthernet * self)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
priv->dispose_has_run = FALSE;
memset (&(priv->hw_addr), 0, sizeof (struct ether_addr));
priv->carrier = FALSE;
- nm_device_set_device_type (NM_DEVICE (self), DEVICE_TYPE_802_3_ETHERNET);
+ nm_device_set_device_type (NM_DEVICE (self), NM_DEVICE_TYPE_ETHERNET);
}
static gboolean
real_is_up (NMDevice *device)
{
- if (!NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device)->supplicant.mgr)
+ if (!NM_DEVICE_ETHERNET_GET_PRIVATE (device)->supplicant.mgr)
return FALSE;
return TRUE;
@@ -328,7 +328,7 @@
static gboolean
real_bring_up (NMDevice *dev)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (dev);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (dev);
priv->supplicant.mgr = nm_supplicant_manager_get ();
@@ -338,7 +338,7 @@
static void
real_take_down (NMDevice *dev)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (dev);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (dev);
if (priv->supplicant.mgr) {
g_object_unref (priv->supplicant.mgr);
@@ -364,8 +364,8 @@
nm_system_device_set_up_down (dev, FALSE);
}
-NMDevice8023Ethernet *
-nm_device_802_3_ethernet_new (const char *udi,
+NMDeviceEthernet *
+nm_device_ethernet_new (const char *udi,
const char *iface,
const char *driver,
gboolean managed)
@@ -374,7 +374,7 @@
g_return_val_if_fail (iface != NULL, NULL);
g_return_val_if_fail (driver != NULL, NULL);
- return (NMDevice8023Ethernet *) g_object_new (NM_TYPE_DEVICE_802_3_ETHERNET,
+ return (NMDeviceEthernet *) g_object_new (NM_TYPE_DEVICE_ETHERNET,
NM_DEVICE_INTERFACE_UDI, udi,
NM_DEVICE_INTERFACE_IFACE, iface,
NM_DEVICE_INTERFACE_DRIVER, driver,
@@ -384,34 +384,34 @@
/*
- * nm_device_802_3_ethernet_get_address
+ * nm_device_ethernet_get_address
*
* Get a device's hardware address
*
*/
void
-nm_device_802_3_ethernet_get_address (NMDevice8023Ethernet *self, struct ether_addr *addr)
+nm_device_ethernet_get_address (NMDeviceEthernet *self, struct ether_addr *addr)
{
g_return_if_fail (self != NULL);
g_return_if_fail (addr != NULL);
- memcpy (addr, &(NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self)->hw_addr), sizeof (struct ether_addr));
+ memcpy (addr, &(NM_DEVICE_ETHERNET_GET_PRIVATE (self)->hw_addr), sizeof (struct ether_addr));
}
/*
* Get/set functions for carrier
*/
gboolean
-nm_device_802_3_ethernet_get_carrier (NMDevice8023Ethernet *self)
+nm_device_ethernet_get_carrier (NMDeviceEthernet *self)
{
g_return_val_if_fail (self != NULL, FALSE);
- return NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self)->carrier;
+ return NM_DEVICE_ETHERNET_GET_PRIVATE (self)->carrier;
}
/* Returns speed in Mb/s */
static guint32
-nm_device_802_3_ethernet_get_speed (NMDevice8023Ethernet *self)
+nm_device_ethernet_get_speed (NMDeviceEthernet *self)
{
int fd;
struct ifreq ifr;
@@ -445,8 +445,8 @@
static void
real_update_hw_address (NMDevice *dev)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (dev);
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
struct ifreq req;
int ret, fd;
@@ -467,7 +467,7 @@
if (memcmp (&priv->hw_addr, &req.ifr_hwaddr.sa_data, sizeof (struct ether_addr))) {
memcpy (&priv->hw_addr, &req.ifr_hwaddr.sa_data, sizeof (struct ether_addr));
- g_object_notify (G_OBJECT (dev), NM_DEVICE_802_3_ETHERNET_HW_ADDRESS);
+ g_object_notify (G_OBJECT (dev), NM_DEVICE_ETHERNET_HW_ADDRESS);
}
out:
@@ -477,7 +477,7 @@
static guint32
real_get_generic_capabilities (NMDevice *dev)
{
- NMDevice8023Ethernet * self = NM_DEVICE_802_3_ETHERNET (dev);
+ NMDeviceEthernet * self = NM_DEVICE_ETHERNET (dev);
guint32 caps = NM_DEVICE_CAP_NONE;
/* cipsec devices are also explicitly unsupported at this time */
@@ -495,14 +495,14 @@
static gboolean
real_can_interrupt_activation (NMDevice *dev)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (dev);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
gboolean interrupt = FALSE;
/* Devices that support carrier detect can interrupt activation
* if the link becomes inactive.
*/
if (nm_device_get_capabilities (dev) & NM_DEVICE_CAP_CARRIER_DETECT) {
- if (nm_device_802_3_ethernet_get_carrier (self) == FALSE)
+ if (nm_device_ethernet_get_carrier (self) == FALSE)
interrupt = TRUE;
}
return interrupt;
@@ -511,10 +511,10 @@
static gboolean
real_can_activate (NMDevice *dev)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (dev);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
/* Can't do anything if there isn't a carrier */
- if (!nm_device_802_3_ethernet_get_carrier (self))
+ if (!nm_device_ethernet_get_carrier (self))
return FALSE;
return TRUE;
@@ -525,8 +525,8 @@
GSList *connections,
char **specific_object)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (dev);
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
GSList *iter;
for (iter = connections; iter; iter = g_slist_next (iter)) {
@@ -567,7 +567,7 @@
NMConnection *connection,
GSList *updated_settings)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (dev);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (dev);
NMActRequest *req;
gboolean valid = FALSE;
GSList *iter;
@@ -622,9 +622,9 @@
/* 802.1X */
static void
-remove_supplicant_timeouts (NMDevice8023Ethernet *self)
+remove_supplicant_timeouts (NMDeviceEthernet *self)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
if (priv->supplicant.con_timeout_id) {
g_source_remove (priv->supplicant.con_timeout_id);
@@ -638,9 +638,9 @@
}
static void
-remove_supplicant_interface_connection_error_handler (NMDevice8023Ethernet *self)
+remove_supplicant_interface_connection_error_handler (NMDeviceEthernet *self)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
if (priv->supplicant.iface_error_id != 0) {
g_signal_handler_disconnect (priv->supplicant.iface, priv->supplicant.iface_error_id);
@@ -649,9 +649,9 @@
}
static void
-supplicant_interface_clean (NMDevice8023Ethernet *self)
+supplicant_interface_clean (NMDeviceEthernet *self)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
remove_supplicant_timeouts (self);
remove_supplicant_interface_connection_error_handler (self);
@@ -681,8 +681,8 @@
static gboolean
link_timeout_cb (gpointer user_data)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (user_data);
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
NMDevice *dev = NM_DEVICE (self);
NMActRequest *req;
NMConnection *connection;
@@ -727,13 +727,13 @@
}
struct state_cb_data {
- NMDevice8023Ethernet *self;
+ NMDeviceEthernet *self;
guint32 new_state;
guint32 old_state;
};
static gboolean
-schedule_state_handler (NMDevice8023Ethernet *self,
+schedule_state_handler (NMDeviceEthernet *self,
GSourceFunc handler,
guint32 new_state,
guint32 old_state)
@@ -784,13 +784,13 @@
new_state,
old_state);
- schedule_state_handler (NM_DEVICE_802_3_ETHERNET (user_data),
+ schedule_state_handler (NM_DEVICE_ETHERNET (user_data),
supplicant_mgr_state_cb_handler,
new_state, old_state);
}
static NMSupplicantConfig *
-build_supplicant_config (NMDevice8023Ethernet *self)
+build_supplicant_config (NMDeviceEthernet *self)
{
DBusGProxy *proxy;
const char *con_path;
@@ -830,7 +830,7 @@
iface = nm_device_get_iface (NM_DEVICE (info->self));
config = build_supplicant_config (info->self);
if (config) {
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (info->self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (info->self);
success = nm_supplicant_interface_set_config (priv->supplicant.iface, config);
g_object_unref (config);
@@ -869,7 +869,7 @@
new_state,
old_state);
- schedule_state_handler (NM_DEVICE_802_3_ETHERNET (user_data),
+ schedule_state_handler (NM_DEVICE_ETHERNET (user_data),
supplicant_iface_state_cb_handler,
new_state,
old_state);
@@ -895,7 +895,7 @@
}
} else if (info->new_state == NM_SUPPLICANT_INTERFACE_CON_STATE_DISCONNECTED) {
if (nm_device_get_state (dev) == NM_DEVICE_STATE_ACTIVATED || nm_device_is_activating (dev)) {
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (info->self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (info->self);
/* Start the link timeout so we allow some time for reauthentication */
if (!priv->link_timeout_id)
@@ -917,7 +917,7 @@
nm_info ("(%s) Supplicant interface state change: %d -> %d",
nm_device_get_iface (NM_DEVICE (user_data)), old_state, new_state);
- schedule_state_handler (NM_DEVICE_802_3_ETHERNET (user_data),
+ schedule_state_handler (NM_DEVICE_ETHERNET (user_data),
supplicant_iface_connection_state_cb_handler,
new_state,
old_state);
@@ -926,7 +926,7 @@
static gboolean
supplicant_iface_connection_error_cb_handler (gpointer user_data)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (user_data);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data);
supplicant_interface_clean (self);
nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED);
@@ -949,7 +949,7 @@
}
static NMActStageReturn
-handle_auth_or_fail (NMDevice8023Ethernet *self,
+handle_auth_or_fail (NMDeviceEthernet *self,
NMActRequest *req,
gboolean new_secrets)
{
@@ -987,7 +987,7 @@
static gboolean
supplicant_connection_timeout_cb (gpointer user_data)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (user_data);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (user_data);
NMDevice *device = NM_DEVICE (self);
NMActRequest *req;
const char *iface;
@@ -1010,9 +1010,9 @@
}
static gboolean
-supplicant_interface_init (NMDevice8023Ethernet *self)
+supplicant_interface_init (NMDeviceEthernet *self)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
const char *iface;
iface = nm_device_get_iface (NM_DEVICE (self));
@@ -1056,7 +1056,7 @@
}
static NMActStageReturn
-nm_8021x_stage2_config (NMDevice8023Ethernet *self)
+nm_8021x_stage2_config (NMDeviceEthernet *self)
{
NMConnection *connection;
NMSetting8021x *security;
@@ -1131,14 +1131,14 @@
NMDevice *device = NM_DEVICE (user_data);
nm_device_set_ip_iface (device, iface);
- NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device)->pending_ip4_config = g_object_ref (config);
+ NM_DEVICE_ETHERNET_GET_PRIVATE (device)->pending_ip4_config = g_object_ref (config);
nm_device_activate_schedule_stage4_ip_config_get (device);
}
static NMActStageReturn
-pppoe_stage2_config (NMDevice8023Ethernet *self)
+pppoe_stage2_config (NMDeviceEthernet *self)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
NMActRequest *req;
GError *err = NULL;
NMActStageReturn ret;
@@ -1185,11 +1185,11 @@
security = (NMSetting8021x *) device_get_setting (device, NM_TYPE_SETTING_802_1X);
if (security)
- ret = nm_8021x_stage2_config (NM_DEVICE_802_3_ETHERNET (device));
+ ret = nm_8021x_stage2_config (NM_DEVICE_ETHERNET (device));
else
ret = NM_ACT_STAGE_RETURN_SUCCESS;
} else if (!strcmp (s_connection->type, NM_SETTING_PPPOE_SETTING_NAME))
- ret = pppoe_stage2_config (NM_DEVICE_802_3_ETHERNET (device));
+ ret = pppoe_stage2_config (NM_DEVICE_ETHERNET (device));
else {
nm_warning ("Invalid connection type '%s' for ethernet device", s_connection->type);
ret = NM_ACT_STAGE_RETURN_FAILURE;
@@ -1201,8 +1201,8 @@
static NMActStageReturn
real_act_stage4_get_ip4_config (NMDevice *device, NMIP4Config **config)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (device);
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
NMActStageReturn ret;
g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
@@ -1212,7 +1212,7 @@
/* Regular ethernet connection. */
/* Chain up to parent */
- ret = NM_DEVICE_CLASS (nm_device_802_3_ethernet_parent_class)->act_stage4_get_ip4_config (device, config);
+ ret = NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->act_stage4_get_ip4_config (device, config);
if ((ret == NM_ACT_STAGE_RETURN_SUCCESS)) {
NMConnection *connection;
@@ -1240,7 +1240,7 @@
static void
real_deactivate_quickly (NMDevice *device)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (device);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device);
nm_device_set_ip_iface (device, NULL);
@@ -1254,7 +1254,7 @@
priv->ppp_manager = NULL;
}
- supplicant_interface_clean (NM_DEVICE_802_3_ETHERNET (device));
+ supplicant_interface_clean (NM_DEVICE_ETHERNET (device));
}
static gboolean
@@ -1262,8 +1262,8 @@
NMConnection *connection,
GError **error)
{
- NMDevice8023Ethernet *self = NM_DEVICE_802_3_ETHERNET (device);
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (self);
+ NMDeviceEthernet *self = NM_DEVICE_ETHERNET (device);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self);
NMSettingConnection *s_con;
NMSettingWired *s_wired;
gboolean is_pppoe = FALSE;
@@ -1307,13 +1307,13 @@
}
static void
-nm_device_802_3_ethernet_dispose (GObject *object)
+nm_device_ethernet_dispose (GObject *object)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (object);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object);
NMNetlinkMonitor *monitor;
if (priv->dispose_has_run) {
- G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_ethernet_parent_class)->dispose (object);
return;
}
@@ -1335,36 +1335,36 @@
priv->state_to_disconnected_id = 0;
}
- G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->dispose (object);
+ G_OBJECT_CLASS (nm_device_ethernet_parent_class)->dispose (object);
}
static void
-nm_device_802_3_ethernet_finalize (GObject *object)
+nm_device_ethernet_finalize (GObject *object)
{
- NMDevice8023EthernetPrivate *priv = NM_DEVICE_802_3_ETHERNET_GET_PRIVATE (object);
+ NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (object);
g_free (priv->carrier_file_path);
- G_OBJECT_CLASS (nm_device_802_3_ethernet_parent_class)->finalize (object);
+ G_OBJECT_CLASS (nm_device_ethernet_parent_class)->finalize (object);
}
static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- NMDevice8023Ethernet *device = NM_DEVICE_802_3_ETHERNET (object);
+ NMDeviceEthernet *device = NM_DEVICE_ETHERNET (object);
struct ether_addr hw_addr;
switch (prop_id) {
case PROP_HW_ADDRESS:
- nm_device_802_3_ethernet_get_address (device, &hw_addr);
+ nm_device_ethernet_get_address (device, &hw_addr);
g_value_take_string (value, nm_ether_ntop (&hw_addr));
break;
case PROP_SPEED:
- g_value_set_uint (value, nm_device_802_3_ethernet_get_speed (device));
+ g_value_set_uint (value, nm_device_ethernet_get_speed (device));
break;
case PROP_CARRIER:
- g_value_set_boolean (value, nm_device_802_3_ethernet_get_carrier (device));
+ g_value_set_boolean (value, nm_device_ethernet_get_carrier (device));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1374,18 +1374,18 @@
static void
-nm_device_802_3_ethernet_class_init (NMDevice8023EthernetClass *klass)
+nm_device_ethernet_class_init (NMDeviceEthernetClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (NMDevice8023EthernetPrivate));
+ g_type_class_add_private (object_class, sizeof (NMDeviceEthernetPrivate));
/* virtual methods */
object_class->constructor = constructor;
- object_class->dispose = nm_device_802_3_ethernet_dispose;
+ object_class->dispose = nm_device_ethernet_dispose;
object_class->get_property = get_property;
- object_class->finalize = nm_device_802_3_ethernet_finalize;
+ object_class->finalize = nm_device_ethernet_finalize;
parent_class->get_generic_capabilities = real_get_generic_capabilities;
parent_class->hw_is_up = real_hw_is_up;
@@ -1408,7 +1408,7 @@
/* properties */
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
- g_param_spec_string (NM_DEVICE_802_3_ETHERNET_HW_ADDRESS,
+ g_param_spec_string (NM_DEVICE_ETHERNET_HW_ADDRESS,
"MAC Address",
"Hardware MAC address",
NULL,
@@ -1416,7 +1416,7 @@
g_object_class_install_property
(object_class, PROP_SPEED,
- g_param_spec_uint (NM_DEVICE_802_3_ETHERNET_SPEED,
+ g_param_spec_uint (NM_DEVICE_ETHERNET_SPEED,
"Speed",
"Speed",
0, G_MAXUINT32, 0,
@@ -1424,7 +1424,7 @@
g_object_class_install_property
(object_class, PROP_CARRIER,
- g_param_spec_boolean (NM_DEVICE_802_3_ETHERNET_CARRIER,
+ g_param_spec_boolean (NM_DEVICE_ETHERNET_CARRIER,
"Carrier",
"Carrier",
FALSE,
@@ -1433,10 +1433,10 @@
/* Signals */
signals[PROPERTIES_CHANGED] =
nm_properties_changed_signal_new (object_class,
- G_STRUCT_OFFSET (NMDevice8023EthernetClass, properties_changed));
+ G_STRUCT_OFFSET (NMDeviceEthernetClass, properties_changed));
dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
- &dbus_glib_nm_device_802_3_ethernet_object_info);
+ &dbus_glib_nm_device_ethernet_object_info);
dbus_g_error_domain_register (NM_ETHERNET_ERROR, NULL, NM_TYPE_ETHERNET_ERROR);
}
@@ -1447,7 +1447,7 @@
/**************************************/
static gboolean
-supports_ethtool_carrier_detect (NMDevice8023Ethernet *self)
+supports_ethtool_carrier_detect (NMDeviceEthernet *self)
{
int fd;
struct ifreq ifr;
@@ -1487,7 +1487,7 @@
#undef _LINUX_IF_H
static int
-mdio_read (NMDevice8023Ethernet *self, int fd, struct ifreq *ifr, int location)
+mdio_read (NMDeviceEthernet *self, int fd, struct ifreq *ifr, int location)
{
struct mii_ioctl_data *mii;
int val = -1;
@@ -1508,7 +1508,7 @@
}
static gboolean
-supports_mii_carrier_detect (NMDevice8023Ethernet *self)
+supports_mii_carrier_detect (NMDeviceEthernet *self)
{
int err, fd, bmsr;
struct ifreq ifr;
Copied: trunk/src/nm-device-ethernet.h (from r3739, /trunk/src/nm-device-802-3-ethernet.h)
==============================================================================
--- /trunk/src/nm-device-802-3-ethernet.h (original)
+++ trunk/src/nm-device-ethernet.h Tue Jun 10 15:54:23 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
@@ -21,8 +21,8 @@
* (C) Copyright 2005 Red Hat, Inc.
*/
-#ifndef NM_DEVICE_802_3_ETHERNET_H
-#define NM_DEVICE_802_3_ETHERNET_H
+#ifndef NM_DEVICE_ETHERNET_H
+#define NM_DEVICE_ETHERNET_H
#include <glib-object.h>
#include <net/ethernet.h>
@@ -31,42 +31,42 @@
G_BEGIN_DECLS
-#define NM_TYPE_DEVICE_802_3_ETHERNET (nm_device_802_3_ethernet_get_type ())
-#define NM_DEVICE_802_3_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023Ethernet))
-#define NM_DEVICE_802_3_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023EthernetClass))
-#define NM_IS_DEVICE_802_3_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_802_3_ETHERNET))
-#define NM_IS_DEVICE_802_3_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_802_3_ETHERNET))
-#define NM_DEVICE_802_3_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023EthernetClass))
-
-#define NM_DEVICE_802_3_ETHERNET_HW_ADDRESS "hw-address"
-#define NM_DEVICE_802_3_ETHERNET_SPEED "speed"
-#define NM_DEVICE_802_3_ETHERNET_CARRIER "carrier"
+#define NM_TYPE_DEVICE_ETHERNET (nm_device_ethernet_get_type ())
+#define NM_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernet))
+#define NM_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
+#define NM_IS_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_ETHERNET))
+#define NM_IS_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_ETHERNET))
+#define NM_DEVICE_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
+
+#define NM_DEVICE_ETHERNET_HW_ADDRESS "hw-address"
+#define NM_DEVICE_ETHERNET_SPEED "speed"
+#define NM_DEVICE_ETHERNET_CARRIER "carrier"
typedef struct {
NMDevice parent;
-} NMDevice8023Ethernet;
+} NMDeviceEthernet;
typedef struct {
NMDeviceClass parent;
/* Signals */
- void (*properties_changed) (NMDevice8023Ethernet *device, GHashTable *properties);
-} NMDevice8023EthernetClass;
+ void (*properties_changed) (NMDeviceEthernet *device, GHashTable *properties);
+} NMDeviceEthernetClass;
-GType nm_device_802_3_ethernet_get_type (void);
+GType nm_device_ethernet_get_type (void);
-NMDevice8023Ethernet *nm_device_802_3_ethernet_new (const char *udi,
+NMDeviceEthernet *nm_device_ethernet_new (const char *udi,
const char *iface,
const char *driver,
gboolean managed);
-void nm_device_802_3_ethernet_get_address (NMDevice8023Ethernet *dev,
+void nm_device_ethernet_get_address (NMDeviceEthernet *dev,
struct ether_addr *addr);
-gboolean nm_device_802_3_ethernet_get_carrier (NMDevice8023Ethernet *dev);
+gboolean nm_device_ethernet_get_carrier (NMDeviceEthernet *dev);
G_END_DECLS
-#endif /* NM_DEVICE_802_3_ETHERNET_H */
+#endif /* NM_DEVICE_ETHERNET_H */
Modified: trunk/src/nm-device-interface.c
==============================================================================
--- trunk/src/nm-device-interface.c (original)
+++ trunk/src/nm-device-interface.c Tue Jun 10 15:54:23 2008
@@ -109,7 +109,7 @@
g_param_spec_uint (NM_DEVICE_INTERFACE_DEVICE_TYPE,
"DeviceType",
"DeviceType",
- 0, G_MAXUINT32, DEVICE_TYPE_UNKNOWN,
+ 0, G_MAXUINT32, NM_DEVICE_TYPE_UNKNOWN,
G_PARAM_READABLE));
g_object_interface_install_property
Modified: trunk/src/nm-device.c
==============================================================================
--- trunk/src/nm-device.c (original)
+++ trunk/src/nm-device.c Tue Jun 10 15:54:23 2008
@@ -124,7 +124,7 @@
self->priv->initialized = FALSE;
self->priv->udi = NULL;
self->priv->iface = NULL;
- self->priv->type = DEVICE_TYPE_UNKNOWN;
+ self->priv->type = NM_DEVICE_TYPE_UNKNOWN;
self->priv->capabilities = NM_DEVICE_CAP_NONE;
self->priv->driver = NULL;
@@ -274,7 +274,7 @@
NMDeviceType
nm_device_get_device_type (NMDevice *self)
{
- g_return_val_if_fail (NM_IS_DEVICE (self), DEVICE_TYPE_UNKNOWN);
+ g_return_val_if_fail (NM_IS_DEVICE (self), NM_DEVICE_TYPE_UNKNOWN);
return self->priv->type;
}
@@ -284,7 +284,7 @@
nm_device_set_device_type (NMDevice *dev, NMDeviceType type)
{
g_return_if_fail (NM_IS_DEVICE (dev));
- g_return_if_fail (NM_DEVICE_GET_PRIVATE (dev)->type == DEVICE_TYPE_UNKNOWN);
+ g_return_if_fail (NM_DEVICE_GET_PRIVATE (dev)->type == NM_DEVICE_TYPE_UNKNOWN);
NM_DEVICE_GET_PRIVATE (dev)->type = type;
}
Modified: trunk/src/nm-gsm-device.c
==============================================================================
--- trunk/src/nm-gsm-device.c (original)
+++ trunk/src/nm-gsm-device.c Tue Jun 10 15:54:23 2008
@@ -710,7 +710,7 @@
static void
nm_gsm_device_init (NMGsmDevice *self)
{
- nm_device_set_device_type (NM_DEVICE (self), DEVICE_TYPE_GSM);
+ nm_device_set_device_type (NM_DEVICE (self), NM_DEVICE_TYPE_GSM);
}
static gboolean
Modified: trunk/src/nm-hal-manager.c
==============================================================================
--- trunk/src/nm-hal-manager.c (original)
+++ trunk/src/nm-hal-manager.c Tue Jun 10 15:54:23 2008
@@ -12,7 +12,7 @@
#include "nm-dbus-manager.h"
#include "nm-utils.h"
#include "nm-device-802-11-wireless.h"
-#include "nm-device-802-3-ethernet.h"
+#include "nm-device-ethernet.h"
#include "nm-gsm-device.h"
#include "nm-cdma-device.h"
@@ -141,7 +141,7 @@
}
driver = nm_get_device_driver_name (priv->hal_ctx, udi);
- device = (GObject *) nm_device_802_3_ethernet_new (udi, iface, driver, managed);
+ device = (GObject *) nm_device_ethernet_new (udi, iface, driver, managed);
libhal_free_string (iface);
g_free (driver);
Modified: trunk/system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c (original)
+++ trunk/system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c Tue Jun 10 15:54:23 2008
@@ -124,26 +124,26 @@
static NMDeviceType
get_device_type_for_connection (NMConnection *connection)
{
- NMDeviceType devtype = DEVICE_TYPE_UNKNOWN;
+ NMDeviceType devtype = NM_DEVICE_TYPE_UNKNOWN;
NMSettingConnection *s_con;
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
if (!s_con)
- return DEVICE_TYPE_UNKNOWN;
+ return NM_DEVICE_TYPE_UNKNOWN;
if ( !strcmp (s_con->type, NM_SETTING_WIRED_SETTING_NAME)
|| !strcmp (s_con->type, NM_SETTING_PPPOE_SETTING_NAME)) {
if (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED))
- devtype = DEVICE_TYPE_802_3_ETHERNET;
+ devtype = NM_DEVICE_TYPE_ETHERNET;
} else if (!strcmp (s_con->type, NM_SETTING_WIRELESS_SETTING_NAME)) {
if (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS))
- devtype = DEVICE_TYPE_802_11_WIRELESS;
+ devtype = NM_DEVICE_TYPE_WIFI;
} else if (!strcmp (s_con->type, NM_SETTING_GSM_SETTING_NAME)) {
if (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM))
- devtype = DEVICE_TYPE_GSM;
+ devtype = NM_DEVICE_TYPE_GSM;
} else if (!strcmp (s_con->type, NM_SETTING_CDMA_SETTING_NAME)) {
if (nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA))
- devtype = DEVICE_TYPE_CDMA;
+ devtype = NM_DEVICE_TYPE_CDMA;
}
return devtype;
@@ -160,22 +160,22 @@
char *udi = NULL;
GSList *devices = NULL;
- if (devtype == DEVICE_TYPE_UNKNOWN)
+ if (devtype == NM_DEVICE_TYPE_UNKNOWN)
devtype = get_device_type_for_connection (connection);
switch (devtype) {
- case DEVICE_TYPE_802_3_ETHERNET:
+ case NM_DEVICE_TYPE_ETHERNET:
s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
if (s_wired) {
- devices = nm_system_config_hal_manager_get_devices_of_type (hal_mgr, DEVICE_TYPE_802_3_ETHERNET);
+ devices = nm_system_config_hal_manager_get_devices_of_type (hal_mgr, NM_DEVICE_TYPE_ETHERNET);
udi = get_ether_device_udi (g_connection, s_wired->mac_address, devices);
}
break;
- case DEVICE_TYPE_802_11_WIRELESS:
+ case NM_DEVICE_TYPE_WIFI:
s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
if (s_wireless) {
- devices = nm_system_config_hal_manager_get_devices_of_type (hal_mgr, DEVICE_TYPE_802_11_WIRELESS);
+ devices = nm_system_config_hal_manager_get_devices_of_type (hal_mgr, NM_DEVICE_TYPE_WIFI);
udi = get_ether_device_udi (g_connection, s_wireless->mac_address, devices);
}
break;
@@ -255,7 +255,7 @@
if (!wrapped)
return NULL;
- udi = get_udi_for_connection (wrapped, g_connection, hal_mgr, DEVICE_TYPE_UNKNOWN);
+ udi = get_udi_for_connection (wrapped, g_connection, hal_mgr, NM_DEVICE_TYPE_UNKNOWN);
object = (GObject *) g_object_new (NM_TYPE_IFCFG_CONNECTION,
NM_IFCFG_CONNECTION_FILENAME, filename,
Modified: trunk/system-settings/plugins/ifcfg-suse/parser.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-suse/parser.c (original)
+++ trunk/system-settings/plugins/ifcfg-suse/parser.c Tue Jun 10 15:54:23 2008
@@ -658,10 +658,10 @@
connection = nm_connection_new ();
switch (type) {
- case DEVICE_TYPE_802_3_ETHERNET:
+ case NM_DEVICE_TYPE_ETHERNET:
parse_ethernet (connection, file, iface);
break;
- case DEVICE_TYPE_802_11_WIRELESS:
+ case NM_DEVICE_TYPE_WIFI:
parse_wireless (connection, file, iface);
break;
default:
Modified: trunk/system-settings/plugins/ifcfg-suse/plugin.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-suse/plugin.c (original)
+++ trunk/system-settings/plugins/ifcfg-suse/plugin.c Tue Jun 10 15:54:23 2008
@@ -232,7 +232,7 @@
{
SCPluginIfcfg *self = SC_PLUGIN_IFCFG (user_data);
- if (dev_type != DEVICE_TYPE_802_3_ETHERNET && dev_type != DEVICE_TYPE_802_11_WIRELESS)
+ if (dev_type != NM_DEVICE_TYPE_ETHERNET && dev_type != NM_DEVICE_TYPE_WIFI)
return;
read_connection (self, udi, dev_type);
@@ -248,7 +248,7 @@
SCPluginIfcfgPrivate *priv = SC_PLUGIN_IFCFG_GET_PRIVATE (self);
NMExportedConnection *exported;
- if (dev_type != DEVICE_TYPE_802_3_ETHERNET && dev_type != DEVICE_TYPE_802_11_WIRELESS)
+ if (dev_type != NM_DEVICE_TYPE_ETHERNET && dev_type != NM_DEVICE_TYPE_WIFI)
return;
if (g_hash_table_remove (priv->unmanaged_devices, udi))
@@ -291,8 +291,8 @@
if (!priv->initialized) {
const char *filename;
- read_connections_by_type (self, DEVICE_TYPE_802_3_ETHERNET);
- read_connections_by_type (self, DEVICE_TYPE_802_11_WIRELESS);
+ read_connections_by_type (self, NM_DEVICE_TYPE_ETHERNET);
+ read_connections_by_type (self, NM_DEVICE_TYPE_WIFI);
filename = SYSCONFDIR"/sysconfig/network/routes";
monitor_routes (self, filename);
Modified: trunk/system-settings/src/main.c
==============================================================================
--- trunk/system-settings/src/main.c (original)
+++ trunk/system-settings/src/main.c Tue Jun 10 15:54:23 2008
@@ -178,9 +178,9 @@
GSList *devs, *iter;
/* Grab wired devices to make default DHCP connections for them if needed */
- devs = nm_system_config_hal_manager_get_devices_of_type (app->hal_mgr, DEVICE_TYPE_802_3_ETHERNET);
+ devs = nm_system_config_hal_manager_get_devices_of_type (app->hal_mgr, NM_DEVICE_TYPE_ETHERNET);
for (iter = devs; iter; iter = g_slist_next (iter)) {
- device_added_cb (NULL, (const char *) iter->data, DEVICE_TYPE_802_3_ETHERNET, app);
+ device_added_cb (NULL, (const char *) iter->data, NM_DEVICE_TYPE_ETHERNET, app);
g_free (iter->data);
}
@@ -390,7 +390,7 @@
Application *app = (Application *) user_data;
WiredDeviceInfo *info;
- if (devtype != DEVICE_TYPE_802_3_ETHERNET)
+ if (devtype != NM_DEVICE_TYPE_ETHERNET)
return;
/* Wait for a plugin to figure out if the device should be managed or not */
Modified: trunk/system-settings/src/nm-system-config-hal-manager.c
==============================================================================
--- trunk/system-settings/src/nm-system-config-hal-manager.c (original)
+++ trunk/system-settings/src/nm-system-config-hal-manager.c Tue Jun 10 15:54:23 2008
@@ -29,7 +29,7 @@
NMSystemConfigHalManager *nm_system_config_hal_manager_get (DBusGConnection *g_connection);
-#define NUM_DEVICE_TYPES DEVICE_TYPE_CDMA
+#define NUM_DEVICE_TYPES NM_DEVICE_TYPE_CDMA
typedef struct {
DBusGConnection *g_connection;
@@ -56,7 +56,7 @@
get_type_for_udi (NMSystemConfigHalManager *manager, const char *udi)
{
NMSystemConfigHalManagerPrivate *priv = NM_SYSTEM_CONFIG_HAL_MANAGER_GET_PRIVATE (manager);
- NMDeviceType devtype = DEVICE_TYPE_UNKNOWN;
+ NMDeviceType devtype = NM_DEVICE_TYPE_UNKNOWN;
DBusGProxy *dev_proxy;
GError *error = NULL;
GSList *capabilities = NULL, *iter;
@@ -66,7 +66,7 @@
udi,
"org.freedesktop.Hal.Device");
if (!dev_proxy)
- return DEVICE_TYPE_UNKNOWN;
+ return NM_DEVICE_TYPE_UNKNOWN;
if (!dbus_g_proxy_call_with_timeout (dev_proxy,
"GetPropertyStringList", 10000, &error,
@@ -79,11 +79,11 @@
if (!g_slist_length (capabilities))
goto out;
- for (iter = capabilities; iter && (devtype == DEVICE_TYPE_UNKNOWN); iter = g_slist_next (iter)) {
+ for (iter = capabilities; iter && (devtype == NM_DEVICE_TYPE_UNKNOWN); iter = g_slist_next (iter)) {
if (!strcmp (iter->data, "net.80203"))
- devtype = DEVICE_TYPE_802_3_ETHERNET;
+ devtype = NM_DEVICE_TYPE_ETHERNET;
else if (!strcmp (iter->data, "net.80211"))
- devtype = DEVICE_TYPE_802_11_WIRELESS;
+ devtype = NM_DEVICE_TYPE_WIFI;
else if (!strcmp (iter->data, "modem")) {
GSList *csets = NULL, *elt;
@@ -91,11 +91,11 @@
"GetPropertyStringList", 10000, &error,
G_TYPE_STRING, "modem.command_sets", G_TYPE_INVALID,
DBUS_TYPE_G_LIST_OF_STRING, &csets, G_TYPE_INVALID)) {
- for (elt = csets; elt && (devtype == DEVICE_TYPE_UNKNOWN); elt = g_slist_next (elt)) {
+ for (elt = csets; elt && (devtype == NM_DEVICE_TYPE_UNKNOWN); elt = g_slist_next (elt)) {
if (!strcmp (elt->data, "GSM-07.07"))
- devtype = DEVICE_TYPE_GSM;
+ devtype = NM_DEVICE_TYPE_GSM;
else if (!strcmp (elt->data, "IS-707-A"))
- devtype = DEVICE_TYPE_CDMA;
+ devtype = NM_DEVICE_TYPE_CDMA;
}
g_slist_foreach (csets, (GFunc) g_free, NULL);
@@ -120,7 +120,7 @@
if (!g_hash_table_lookup (priv->devices, udi)) {
devtype = get_type_for_udi (manager, udi);
- if (devtype != DEVICE_TYPE_UNKNOWN) {
+ if (devtype != NM_DEVICE_TYPE_UNKNOWN) {
g_hash_table_insert (priv->devices, g_strdup (udi), GUINT_TO_POINTER (devtype));
g_signal_emit (manager, signals[DEVICE_ADDED], 0, udi, devtype);
}
@@ -135,7 +135,7 @@
NMDeviceType devtype;
devtype = GPOINTER_TO_UINT (g_hash_table_lookup (priv->devices, udi));
- if (devtype != DEVICE_TYPE_UNKNOWN) {
+ if (devtype != NM_DEVICE_TYPE_UNKNOWN) {
g_signal_emit (manager, signals[DEVICE_REMOVED], 0, udi, devtype);
g_hash_table_remove (priv->devices, udi);
}
@@ -153,7 +153,7 @@
if (!g_hash_table_lookup (priv->devices, udi)) {
devtype = get_type_for_udi (manager, udi);
- if (devtype != DEVICE_TYPE_UNKNOWN) {
+ if (devtype != NM_DEVICE_TYPE_UNKNOWN) {
g_hash_table_insert (priv->devices, g_strdup (udi), GUINT_TO_POINTER (devtype));
g_signal_emit (manager, signals[DEVICE_ADDED], 0, udi, devtype);
}
@@ -363,8 +363,8 @@
{
NMSystemConfigHalManagerPrivate *priv;
- g_return_val_if_fail (NM_IS_SYSTEM_CONFIG_HAL_MANAGER (manager), DEVICE_TYPE_UNKNOWN);
- g_return_val_if_fail (udi != NULL, DEVICE_TYPE_UNKNOWN);
+ g_return_val_if_fail (NM_IS_SYSTEM_CONFIG_HAL_MANAGER (manager), NM_DEVICE_TYPE_UNKNOWN);
+ g_return_val_if_fail (udi != NULL, NM_DEVICE_TYPE_UNKNOWN);
priv = NM_SYSTEM_CONFIG_HAL_MANAGER_GET_PRIVATE (manager);
return GPOINTER_TO_UINT (g_hash_table_lookup (priv->devices, udi));
Modified: trunk/test/nm-tool.c
==============================================================================
--- trunk/test/nm-tool.c (original)
+++ trunk/test/nm-tool.c Tue Jun 10 15:54:23 2008
@@ -32,7 +32,7 @@
#include <nm-client.h>
#include <nm-device.h>
-#include <nm-device-802-3-ethernet.h>
+#include <nm-device-ethernet.h>
#include <nm-device-802-11-wireless.h>
#include <nm-gsm-device.h>
#include <nm-cdma-device.h>
@@ -213,7 +213,7 @@
nm_device_get_iface (device));
/* General information */
- if (NM_IS_DEVICE_802_3_ETHERNET (device))
+ if (NM_IS_DEVICE_ETHERNET (device))
print_string ("Type", "Wired");
else if (NM_IS_DEVICE_802_11_WIRELESS (device))
print_string ("Type", "802.11 Wireless");
@@ -243,8 +243,8 @@
}
tmp = NULL;
- if (NM_IS_DEVICE_802_3_ETHERNET (device))
- tmp = g_strdup (nm_device_802_3_ethernet_get_hw_address (NM_DEVICE_802_3_ETHERNET (device)));
+ if (NM_IS_DEVICE_ETHERNET (device))
+ tmp = g_strdup (nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)));
else if (NM_IS_DEVICE_802_11_WIRELESS (device))
tmp = g_strdup (nm_device_802_11_wireless_get_hw_address (NM_DEVICE_802_11_WIRELESS (device)));
@@ -264,13 +264,13 @@
print_string (" Carrier Detect", "yes");
speed = 0;
- if (NM_IS_DEVICE_802_3_ETHERNET (device)) {
+ if (NM_IS_DEVICE_ETHERNET (device)) {
/* Speed in Mb/s */
- speed = nm_device_802_3_ethernet_get_speed (NM_DEVICE_802_3_ETHERNET (device));
+ speed = nm_device_ethernet_get_speed (NM_DEVICE_ETHERNET (device));
} else if (NM_IS_DEVICE_802_11_WIRELESS (device)) {
/* Speed in b/s */
speed = nm_device_802_11_wireless_get_bitrate (NM_DEVICE_802_11_WIRELESS (device));
- speed /= 1000000;
+ speed /= 1000;
}
if (speed) {
@@ -309,7 +309,7 @@
aps = nm_device_802_11_wireless_get_access_points (NM_DEVICE_802_11_WIRELESS (device));
if (aps && aps->len)
g_ptr_array_foreach ((GPtrArray *) aps, detail_access_point, (gpointer) active_bssid);
- } else if (NM_IS_DEVICE_802_3_ETHERNET (device)) {
+ } else if (NM_IS_DEVICE_ETHERNET (device)) {
printf ("\n Wired Settings\n");
/* FIXME */
#if 0
Modified: trunk/test/nmtestdevices.c
==============================================================================
--- trunk/test/nmtestdevices.c (original)
+++ trunk/test/nmtestdevices.c Tue Jun 10 15:54:23 2008
@@ -38,7 +38,7 @@
char *string;
g_return_if_fail (connection != NULL);
- g_return_if_fail (((type == DEVICE_TYPE_802_3_ETHERNET) || (type == DEVICE_TYPE_802_11_WIRELESS)));
+ g_return_if_fail (((type == NM_DEVICE_TYPE_ETHERNET) || (type == NM_DEVICE_TYPE_WIFI)));
message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "createTestDevice");
if (message == NULL)
@@ -189,7 +189,7 @@
gboolean destroy = FALSE;
gboolean make_link_active = FALSE;
gboolean make_link_inactive = FALSE;
- NMDeviceType dev_type = DEVICE_TYPE_UNKNOWN;
+ NMDeviceType dev_type = NM_DEVICE_TYPE_UNKNOWN;
if (argc < 2) {
print_usage ();
@@ -231,9 +231,9 @@
if (optarg)
{
if (strcmp (optarg, "wired") == 0)
- dev_type = DEVICE_TYPE_802_3_ETHERNET;
+ dev_type = NM_DEVICE_TYPE_ETHERNET;
else if (strcmp (optarg, "wireless") == 0)
- dev_type = DEVICE_TYPE_802_11_WIRELESS;
+ dev_type = NM_DEVICE_TYPE_WIFI;
}
}
else if (strcmp (opt, "remove-device") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]