Top |
NMActiveConnection * | active-connection | Read |
gboolean | autoconnect | Read / Write |
NMObjectArray * | available-connections | Read |
guint | capabilities | Read |
guint | device-type | Read |
NMDHCP4Config * | dhcp4-config | Read |
NMDHCP6Config * | dhcp6-config | Read |
gchar * | driver | Read |
gchar * | driver-version | Read |
gboolean | firmware-missing | Read |
gchar * | firmware-version | Read |
gchar * | interface | Read |
gchar * | ip-interface | Read |
NMIP4Config * | ip4-config | Read |
NMIP6Config * | ip6-config | Read |
gboolean | managed | Read |
guint | mtu | Read |
gchar * | physical-port-id | Read |
gchar * | product | Read |
guint | state | Read |
GValueArray_guint+guint_* | state-reason | Read |
gchar * | udi | Read |
gchar * | vendor | Read |
enum | NMDeviceError |
#define | NM_DEVICE_ERROR |
#define | NM_DEVICE_DEVICE_TYPE |
#define | NM_DEVICE_UDI |
#define | NM_DEVICE_INTERFACE |
#define | NM_DEVICE_IP_INTERFACE |
#define | NM_DEVICE_DRIVER |
#define | NM_DEVICE_DRIVER_VERSION |
#define | NM_DEVICE_FIRMWARE_VERSION |
#define | NM_DEVICE_CAPABILITIES |
#define | NM_DEVICE_MANAGED |
#define | NM_DEVICE_AUTOCONNECT |
#define | NM_DEVICE_FIRMWARE_MISSING |
#define | NM_DEVICE_IP4_CONFIG |
#define | NM_DEVICE_DHCP4_CONFIG |
#define | NM_DEVICE_IP6_CONFIG |
#define | NM_DEVICE_DHCP6_CONFIG |
#define | NM_DEVICE_STATE |
#define | NM_DEVICE_STATE_REASON |
#define | NM_DEVICE_ACTIVE_CONNECTION |
#define | NM_DEVICE_AVAILABLE_CONNECTIONS |
#define | NM_DEVICE_VENDOR |
#define | NM_DEVICE_PRODUCT |
#define | NM_DEVICE_PHYSICAL_PORT_ID |
#define | NM_DEVICE_MTU |
GObject ╰── NMObject ╰── NMDevice ├── NMDeviceEthernet ├── NMDeviceWifi ├── NMDeviceModem ├── NMDeviceBt ├── NMDeviceWimax ├── NMDeviceOlpcMesh ├── NMDeviceAdsl ├── NMDeviceInfiniband ├── NMDeviceBond ├── NMDeviceBridge ├── NMDeviceTeam ├── NMDeviceGeneric ╰── NMDeviceVlan
GQuark
nm_device_error_quark (void
);
Registers an error quark for NMDevice if necessary.
Since: 0.9.10
GObject * nm_device_new (DBusGConnection *connection
,const char *path
);
Creates a new NMDevice.
const char *
nm_device_get_iface (NMDevice *device
);
Gets the interface name of the NMDevice.
const char *
nm_device_get_ip_iface (NMDevice *device
);
Gets the IP interface name of the NMDevice over which IP traffic flows when the device is in the ACTIVATED state.
NMDeviceType
nm_device_get_device_type (NMDevice *device
);
Returns the numeric type of the NMDevice, ie Ethernet, Wi-Fi, etc.
const char *
nm_device_get_udi (NMDevice *device
);
Gets the Unique Device Identifier of the NMDevice.
const char *
nm_device_get_driver (NMDevice *device
);
Gets the driver of the NMDevice.
const char *
nm_device_get_driver_version (NMDevice *device
);
Gets the driver version of the NMDevice.
const char *
nm_device_get_firmware_version (NMDevice *device
);
Gets the firmware version of the NMDevice.
const char *
nm_device_get_type_description (NMDevice *device
);
Gets a (non-localized) description of the type of device that
device
is.
the type description of the device. This is the internal string used by the device, and must not be modified.
Since: 0.9.10
const char *
nm_device_get_hw_address (NMDevice *device
);
Gets the current a hardware address (MAC) for the device
.
the current MAC of the device, or NULL
.
This is the internal string used by the device, and must not be modified.
Since: 0.9.10
NMDeviceCapabilities
nm_device_get_capabilities (NMDevice *device
);
Gets the device' capabilities.
gboolean
nm_device_get_managed (NMDevice *device
);
Whether the NMDevice is managed by NetworkManager.
gboolean
nm_device_get_autoconnect (NMDevice *device
);
Whether the NMDevice can be autoconnected.
void nm_device_set_autoconnect (NMDevice *device
,gboolean autoconnect
);
Enables or disables automatic activation of the NMDevice.
gboolean
nm_device_get_firmware_missing (NMDevice *device
);
Indicates that firmware required for the device's operation is likely to be missing.
NMIP4Config *
nm_device_get_ip4_config (NMDevice *device
);
Gets the current NMIP4Config associated with the NMDevice.
Note that as of NetworkManager 0.9.10, you can alternatively use
nm_active_connection_get_ip4_config()
, which also works with VPN
connections.
NMDHCP4Config *
nm_device_get_dhcp4_config (NMDevice *device
);
Gets the current NMDHCP4Config associated with the NMDevice.
Note that as of NetworkManager 0.9.10, you can alternatively use
nm_active_connection_get_dhcp4_config()
, which also works with VPN
connections.
NMIP6Config *
nm_device_get_ip6_config (NMDevice *device
);
Gets the current NMIP6Config associated with the NMDevice.
Note that as of NetworkManager 0.9.10, you can alternatively use
nm_active_connection_get_ip6_config()
, which also works with VPN
connections.
NMDHCP6Config *
nm_device_get_dhcp6_config (NMDevice *device
);
Gets the current NMDHCP6Config associated with the NMDevice.
Note that as of NetworkManager 0.9.10, you can alternatively use
nm_active_connection_get_dhcp6_config()
, which also works with VPN
connections.
NMDeviceState
nm_device_get_state (NMDevice *device
);
Gets the current NMDevice state.
NMDeviceState nm_device_get_state_reason (NMDevice *device
,NMDeviceStateReason *reason
);
Gets the current NMDevice state (return value) and the reason for entering
the state (reason
argument).
device |
a NMDevice |
|
reason |
location to store reason (NMDeviceStateReason), or |
[out][allow-none] |
NMActiveConnection *
nm_device_get_active_connection (NMDevice *device
);
Gets the NMActiveConnection object which owns this device during activation.
the NMActiveConnection or NULL
if the device is
not part of an active connection.
[transfer none]
const GPtrArray *
nm_device_get_available_connections (NMDevice *device
);
Gets the NMRemoteConnections currently known to the daemon that could
be activated on device
.
the GPtrArray containing NMRemoteConnections. This is the internal copy used by the connection, and must not be modified.
[element-type NMRemoteConnection]
Since: 0.9.8
const char *
nm_device_get_physical_port_id (NMDevice *device
);
Gets the physical port ID of the NMDevice. If non-NULL
, this is
an opaque string that can be used to recognize when
seemingly-unrelated NMDevices are actually just different virtual
ports on a single physical port. (Eg, NPAR / SR-IOV.)
the physical port ID of the device, or NULL
if the port
ID is unknown. This is the internal string used by the device and
must not be modified.
Since: 0.9.10
guint32
nm_device_get_mtu (NMDevice *device
);
Gets the MTU of the NMDevice.
Since: 0.9.10
gboolean
nm_device_is_software (NMDevice *device
);
Whether the device is a software device.
Since: 1.0
const char *
nm_device_get_product (NMDevice *device
);
Gets the product string of the NMDevice.
const char *
nm_device_get_vendor (NMDevice *device
);
Gets the vendor string of the NMDevice.
const char *
nm_device_get_description (NMDevice *device
);
Gets a description of device
, based on its vendor and product names.
a description of device
. If either the vendor or the
product name is unknown, this returns the interface name.
Since: 0.9.10
char ** nm_device_disambiguate_names (NMDevice **devices
,int num_devices
);
Generates a list of short-ish unique presentation names for the
devices in devices
.
Since: 0.9.10
void (*NMDeviceCallbackFn) (NMDevice *device
,GError *error
,gpointer user_data
);
void nm_device_disconnect (NMDevice *device
,NMDeviceCallbackFn callback
,gpointer user_data
);
Disconnects the device if currently connected, and prevents the device from automatically connecting to networks until the next manual network connection request.
device |
a NMDevice |
|
callback |
callback to be called when disconnect operation completes. |
[scope async][allow-none] |
user_data |
caller-specific data passed to |
[closure] |
void nm_device_delete (NMDevice *device
,NMDeviceCallbackFn callback
,gpointer user_data
);
Deletes the software device. Hardware devices can't be deleted.
device |
a NMDevice |
|
callback |
callback to be called when delete operation completes. |
[scope async][allow-none] |
user_data |
caller-specific data passed to |
[closure] |
Since: 1.0
GSList * nm_device_filter_connections (NMDevice *device
,const GSList *connections
);
Filters a given list of connections for a given NMDevice object and return
connections which may be activated with the device. For example if device
is a Wi-Fi device that supports only WEP encryption, the returned list will
contain any Wi-Fi connections in connections
that allow connection to
unencrypted or WEP-enabled SSIDs. The returned list will not contain
Ethernet, Bluetooth, Wi-Fi WPA connections, or any other connection that is
incompatible with the device. To get the full list of connections see
nm_remote_settings_list_connections()
.
device |
an NMDevice to filter connections for |
|
connections |
a list of NMConnection objects to filter. |
[element-type NMConnection] |
a
list of NMConnection objects that could be activated with the given device
.
The elements of the list are owned by their creator and should not be freed
by the caller, but the returned list itself is owned by the caller and should
be freed with g_slist_free()
when it is no longer required.
[transfer container][element-type NMConnection]
gboolean nm_device_connection_valid (NMDevice *device
,NMConnection *connection
);
Validates a given connection for a given NMDevice object and returns
whether the connection may be activated with the device. For example if
device
is a Wi-Fi device that supports only WEP encryption, the connection
will only be valid if it is a Wi-Fi connection which describes a WEP or open
network, and will not be valid if it describes a WPA network, or if it is
an Ethernet, Bluetooth, WWAN, etc connection that is incompatible with the
device.
device |
an NMDevice to validate |
|
connection |
an NMConnection to validate against |
gboolean nm_device_connection_compatible (NMDevice *device
,NMConnection *connection
,GError **error
);
Validates a given connection for a given NMDevice object and returns
whether the connection may be activated with the device. For example if
device
is a Wi-Fi device that supports only WEP encryption, the connection
will only be valid if it is a Wi-Fi connection which describes a WEP or open
network, and will not be valid if it describes a WPA network, or if it is
an Ethernet, Bluetooth, WWAN, etc connection that is incompatible with the
device.
This function does the same as nm_device_connection_valid()
, i.e. checking
compatibility of the given device and connection. But, in addition, it sets
GError when FALSE is returned.
device |
an NMDevice to validate |
|
connection |
an NMConnection to validate against |
|
error |
return location for a GError, or |
GType
nm_device_get_setting_type (NMDevice *device
);
Gets the (primary) NMSetting subtype associated with connections
that can be used on device
.
Since: 0.9.10
void (*NMDeviceDeactivateFn) (NMDevice *device
,GError *error
,gpointer user_data
);
NMDeviceDeactivateFn
is deprecated and should not be used in newly-written code.
“active-connection”
property“active-connection” NMActiveConnection *
The NMActiveConnection object that "owns" this device during activation.
Flags: Read
“autoconnect”
property “autoconnect” gboolean
Whether the device can auto-activate a connection.
Flags: Read / Write
Default value: TRUE
“available-connections”
property “available-connections” NMObjectArray *
The available connections (NMRemoteConnection) of the device
Flags: Read
Since: 0.9.8
“capabilities”
property “capabilities” guint
The capabilities of the device.
Flags: Read
Default value: 0
“device-type”
property “device-type” guint
The numeric type of the device.
Flags: Read
Default value: 0
“dhcp4-config”
property“dhcp4-config” NMDHCP4Config *
The NMDHCP4Config of the device.
Flags: Read
“dhcp6-config”
property“dhcp6-config” NMDHCP6Config *
The NMDHCP6Config of the device.
Flags: Read
“driver-version”
property “driver-version” gchar *
The version of the device driver.
Flags: Read
Default value: NULL
“firmware-missing”
property “firmware-missing” gboolean
When TRUE
indicates the device is likely missing firmware required
for its operation.
Flags: Read
Default value: FALSE
“firmware-version”
property “firmware-version” gchar *
The firmware version of the device.
Flags: Read
Default value: NULL
“interface”
property “interface” gchar *
The interface of the device.
Flags: Read
Default value: NULL
“ip-interface”
property “ip-interface” gchar *
The IP interface of the device which should be used for all IP-related operations like addressing and routing.
Flags: Read
Default value: NULL
“managed”
property “managed” gboolean
Whether the device is managed by NetworkManager.
Flags: Read
Default value: FALSE
“physical-port-id”
property “physical-port-id” gchar *
The physical port ID of the device. (See
nm_device_get_physical_port_id()
.)
Flags: Read
Default value: NULL
Since: 0.9.10
“product”
property “product” gchar *
The product string of the device.
Flags: Read
Default value: NULL
“state-reason”
property “state-reason” GValueArray_guint+guint_*
The state and reason of the device.
Flags: Read
“udi”
property “udi” gchar *
An operating-system specific device hardware identifier; this is not unique to a specific hardware device across reboots or hotplugs. It is an opaque string which for some device types (Bluetooth, Modem) contains an identifier provided by the underlying hardware service daemon such as Bluez or ModemManager, and clients can use this property to request more information about the device from those services.
Flags: Read
Default value: NULL
“state-changed”
signalvoid user_function (NMDevice *device, guint new_state, guint old_state, guint reason, gpointer user_data)
Notifies the state change of a NMDevice.
device |
the device object that received the signal |
|
new_state |
the new state of the device |
|
old_state |
the previous state of the device |
|
reason |
the reason describing the state change |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First