Top |
NMActiveConnection * | active-connection | Read |
gboolean | autoconnect | Read / Write |
GPtrArray * | available-connections | Read |
NMDeviceCapabilities | capabilities | Read |
NMDeviceType | device-type | Read |
NMDhcpConfig * | dhcp4-config | Read |
NMDhcpConfig * | dhcp6-config | Read |
char * | driver | Read |
char * | driver-version | Read |
gboolean | firmware-missing | Read |
char * | firmware-version | Read |
char * | hw-address | Read |
char * | interface | Read |
guint | interface-flags | Read |
char * | ip-interface | Read |
NMIPConfig * | ip4-config | Read |
NMConnectivityState | ip4-connectivity | Read |
NMIPConfig * | ip6-config | Read |
NMConnectivityState | ip6-connectivity | Read |
GPtrArray * | lldp-neighbors | Read |
gboolean | managed | Read |
guint | metered | Read |
guint | mtu | Read |
gboolean | nm-plugin-missing | Read |
char * | path | Read |
char * | physical-port-id | Read |
GPtrArray * | ports | Read |
char * | product | Read |
gboolean | real | Read |
NMDeviceState | state | Read |
guint | state-reason | Read |
char * | udi | Read |
char * | vendor | Read |
GBoxed ╰── NMLldpNeighbor GObject ╰── NMObject ╰── NMDevice ├── NMDevice6Lowpan ├── NMDeviceAdsl ├── NMDeviceBond ├── NMDeviceBridge ├── NMDeviceBt ├── NMDeviceDummy ├── NMDeviceEthernet ├── NMDeviceGeneric ├── NMDeviceHsr ├── NMDeviceInfiniband ├── NMDeviceIPTunnel ├── NMDeviceLoopback ├── NMDeviceMacsec ├── NMDeviceMacvlan ├── NMDeviceModem ├── NMDeviceOlpcMesh ├── NMDeviceOvsBridge ├── NMDeviceOvsInterface ├── NMDeviceOvsPort ├── NMDevicePpp ├── NMDeviceTeam ├── NMDeviceTun ├── NMDeviceVlan ├── NMDeviceVrf ├── NMDeviceVxlan ├── NMDeviceWifi ├── NMDeviceWifiP2P ├── NMDeviceWimax ├── NMDeviceWireGuard ╰── NMDeviceWpan
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_path (NMDevice *device
);
Gets the path of the NMDevice as exposed by the udev property ID_PATH.
the path of the device.
The string is backslash escaped (C escaping) for invalid characters. The escaping
can be reverted with g_strcompress()
, however the result may not be valid UTF-8.
Since: 1.26
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.
const char *
nm_device_get_hw_address (NMDevice *device
);
Gets the current a hardware address (MAC) for the device
.
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.
const GPtrArray *
nm_device_get_ports (NMDevice *device
);
Gets the devices currently set as port of device
.
the GPtrArray containing NMDevices that
are ports of device
. This is the internal copy used by the device and
must not be modified.
[element-type NMDevice]
Since: 1.34
void nm_device_set_managed (NMDevice *device
,gboolean managed
);
nm_device_set_managed
has been deprecated since version 1.22 and should not be used in newly-written code.
Use the async command nm_client_dbus_set_property()
on
nm_object_get_path()
, interface NM_DBUS_INTERFACE_DEVICE
to set the
"Managed" property to a "(b)" boolean value.
This function is deprecated because it calls a synchronous D-Bus method
and modifies the content of the NMClient cache client side. Also, it does
not emit a property changed signal.
Enables or disables management of NMDevice by NetworkManager.
Since: 1.2
gboolean
nm_device_get_autoconnect (NMDevice *device
);
Whether the NMDevice can be autoconnected.
void nm_device_set_autoconnect (NMDevice *device
,gboolean autoconnect
);
nm_device_set_autoconnect
has been deprecated since version 1.22 and should not be used in newly-written code.
Use the async command nm_client_dbus_set_property()
on
nm_object_get_path()
, NM_DBUS_INTERFACE_DEVICE
to set "Autoconnect" property to a "(b)" value.
This function is deprecated because it calls a synchronous D-Bus method
and modifies the content of the NMClient cache client side.
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.
gboolean
nm_device_get_nm_plugin_missing (NMDevice *device
);
Indicates that the NetworkManager plugin for the device is not installed.
Since: 1.2
NMIPConfig *
nm_device_get_ip4_config (NMDevice *device
);
Gets the current IPv4 NMIPConfig associated with the NMDevice.
You can alternatively use nm_active_connection_get_ip4_config()
, which also
works with VPN connections.
NMDhcpConfig *
nm_device_get_dhcp4_config (NMDevice *device
);
Gets the current IPv4 NMDhcpConfig associated with the NMDevice.
You can alternatively use nm_active_connection_get_dhcp4_config()
, which also
works with VPN connections.
the IPv4 NMDhcpConfig, or NULL
if the device is
not activated or not using DHCP.
[transfer none]
NMIPConfig *
nm_device_get_ip6_config (NMDevice *device
);
Gets the current IPv6 NMIPConfig associated with the NMDevice.
You can alternatively use nm_active_connection_get_ip6_config()
, which also
works with VPN connections.
NMDhcpConfig *
nm_device_get_dhcp6_config (NMDevice *device
);
Gets the current IPv6 NMDhcpConfig associated with the NMDevice.
You can alternatively use nm_active_connection_get_dhcp6_config()
, which also
works with VPN connections.
the IPv6 NMDhcpConfig, or NULL
if the device is
not activated or not using DHCPv6.
[transfer none]
NMConnectivityState nm_device_get_connectivity (NMDevice *device
,int addr_family
);
The connectivity state of the device for given address family.
Supported address families are AF_INET
for IPv4, AF_INET6
for IPv6 or AF_UNSPEC
for any.
Since: 1.16
NMDeviceState
nm_device_get_state (NMDevice *device
);
Gets the current NMDevice state.
NMDeviceStateReason
nm_device_get_state_reason (NMDevice *device
);
Gets the reason for entering the current NMDevice state.
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]
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.)
gboolean
nm_device_is_real (NMDevice *device
);
TRUE
if the device exists, or FALSE
if it is a placeholder device
that could be automatically created by NetworkManager if one of its
“available-connections” was activated.
Since: 1.2
gboolean
nm_device_is_software (NMDevice *device
);
Whether the device is a software device.
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.
NMMetered
nm_device_get_metered (NMDevice *device
);
Gets the metered setting of a NMDevice.
Since: 1.2
GPtrArray *
nm_device_get_lldp_neighbors (NMDevice *device
);
Gets the list of neighbors discovered through LLDP.
the GPtrArray containing NMLldpNeighbors. This is the internal copy used by the device and must not be modified. The library never modifies the returned array and thus it is safe for callers to reference and keep using it.
[element-type NMLldpNeighbor][transfer none]
Since: 1.2
NMDeviceInterfaceFlags
nm_device_get_interface_flags (NMDevice *device
);
Gets the interface flags of the device.
Since: 1.22
char ** nm_device_disambiguate_names (NMDevice **devices
,int num_devices
);
Generates a list of short-ish unique presentation names for the
devices in devices
.
gboolean nm_device_reapply (NMDevice *device
,NMConnection *connection
,guint64 version_id
,guint32 flags
,GCancellable *cancellable
,GError **error
);
nm_device_reapply
has been deprecated since version 1.22 and should not be used in newly-written code.
Use nm_device_reapply_async()
or GDBusConnection.
Attempts to update device with changes to the currently active connection made since it was last applied.
device |
a NMDevice |
|
connection |
the NMConnection to replace the applied
settings with or |
[nullable] |
version_id |
zero or the expected version id of the applied connection. If specified and the version id mismatches, the call fails without modification. This allows to catch concurrent accesses. |
|
flags |
always set this to zero |
|
cancellable |
a GCancellable, or |
|
error |
location for a GError, or |
Since: 1.2
void nm_device_reapply_async (NMDevice *device
,NMConnection *connection
,guint64 version_id
,guint32 flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously begins an attempt to update device with changes to the currently active connection made since it was last applied.
device |
a NMDevice |
|
connection |
the NMConnection to replace the applied
settings with or |
[nullable] |
version_id |
zero or the expected version id of the applied connection. If specified and the version id mismatches, the call fails without modification. This allows to catch concurrent accesses. |
|
flags |
always set this to zero |
|
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the reapply operation completes |
|
user_data |
caller-specific data passed to |
Since: 1.2
gboolean nm_device_reapply_finish (NMDevice *device
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_device_reapply_async()
.
device |
a NMDevice |
|
result |
the result passed to the GAsyncReadyCallback |
|
error |
location for a GError, or |
Since: 1.2
NMConnection * nm_device_get_applied_connection (NMDevice *device
,guint32 flags
,guint64 *version_id
,GCancellable *cancellable
,GError **error
);
nm_device_get_applied_connection
has been deprecated since version 1.22 and should not be used in newly-written code.
Use nm_device_get_applied_connection_async()
or GDBusConnection.
Fetch the currently applied connection on the device.
device |
a NMDevice |
|
flags |
the flags argument. See NMDeviceReapplyFlags. |
|
version_id |
returns the current version id of the applied connection. |
[out][optional] |
cancellable |
a GCancellable, or |
|
error |
location for a GError, or |
a NMConnection
with the currently applied settings
or NULL
on error.
The connection is as received from D-Bus and might not validate according
to nm_connection_verify()
.
[transfer full]
Since: 1.2
void nm_device_get_applied_connection_async (NMDevice *device
,guint32 flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously begins and gets the currently applied connection.
device |
a NMDevice |
|
flags |
the flags argument. See NMDeviceReapplyFlags. |
|
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the reapply operation completes |
|
user_data |
caller-specific data passed to |
Since: 1.2
NMConnection * nm_device_get_applied_connection_finish (NMDevice *device
,GAsyncResult *result
,guint64 *version_id
,GError **error
);
Gets the result of a call to nm_device_get_applied_connection_async()
.
device |
a NMDevice |
|
result |
the result passed to the GAsyncReadyCallback |
|
version_id |
the current version id of the applied connection. |
[out][optional] |
error |
location for a GError, or |
a currently applied NMConnection
or NULL
in case
of error.
The connection is as received from D-Bus and might not validate according
to nm_connection_verify()
.
[transfer full]
Since: 1.2
gboolean nm_device_disconnect (NMDevice *device
,GCancellable *cancellable
,GError **error
);
nm_device_disconnect
has been deprecated since version 1.22 and should not be used in newly-written code.
Use nm_device_disconnect_async()
or GDBusConnection.
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 |
|
cancellable |
a GCancellable, or |
|
error |
location for a GError, or |
void nm_device_disconnect_async (NMDevice *device
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously begins disconnecting the device if currently connected, and prevents the device from automatically connecting to networks until the next manual network connection request.
device |
a NMDevice |
|
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the disconnect operation completes |
|
user_data |
caller-specific data passed to |
gboolean nm_device_disconnect_finish (NMDevice *device
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_device_disconnect_async()
.
device |
a NMDevice |
|
result |
the result passed to the GAsyncReadyCallback |
|
error |
location for a GError, or |
gboolean nm_device_delete (NMDevice *device
,GCancellable *cancellable
,GError **error
);
nm_device_delete
has been deprecated since version 1.22 and should not be used in newly-written code.
Use nm_device_delete_async()
or GDBusConnection.
Deletes the software device. Hardware devices can't be deleted.
device |
a NMDevice |
|
cancellable |
a GCancellable, or |
|
error |
location for a GError, or |
void nm_device_delete_async (NMDevice *device
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously begins deleting the software device. Hardware devices can't be deleted.
device |
a NMDevice |
|
cancellable |
a GCancellable, or |
|
callback |
callback to be called when delete operation completes |
|
user_data |
caller-specific data passed to |
gboolean nm_device_delete_finish (NMDevice *device
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_device_delete_async()
.
device |
a NMDevice |
|
result |
the result passed to the GAsyncReadyCallback |
|
error |
location for a GError, or |
GPtrArray * nm_device_filter_connections (NMDevice *device
,const GPtrArray *connections
);
Filters a given array of connections for a given NMDevice object and returns
connections which may be activated with the device. For example if device
is a Wi-Fi device that supports only WEP encryption, the returned array will
contain any Wi-Fi connections in connections
that allow connection to
unencrypted or WEP-enabled SSIDs. The returned array 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_client_get_connections()
.
device |
an NMDevice to filter connections for |
|
connections |
an array of NMConnections to filter. |
[element-type NMConnection] |
an array of
NMConnections that could be activated with the given device
. The array
should be freed with g_ptr_array_unref()
when it is no longer required.
WARNING: the transfer annotation for this function may not work correctly
with bindings. See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/305.
You can filter the list yourself with nm_device_connection_valid()
.
[transfer full][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
.
void
nm_lldp_neighbor_ref (NMLldpNeighbor *neighbor
);
Increases the reference count of the object.
Since 1.32, ref-counting of NMLldpNeighbor is thread-safe.
Since: 1.2
void
nm_lldp_neighbor_unref (NMLldpNeighbor *neighbor
);
Decreases the reference count of the object. If the reference count reaches zero, the object will be destroyed.
Since 1.32, ref-counting of NMLldpNeighbor is thread-safe.
Since: 1.2
char **
nm_lldp_neighbor_get_attr_names (NMLldpNeighbor *neighbor
);
Gets an array of attribute names available for neighbor
.
Since: 1.2
GVariant * nm_lldp_neighbor_get_attr_value (NMLldpNeighbor *neighbor
,const char *name
);
Gets the value (as a GVariant) of attribute with name name
on neighbor
Since: 1.18
NMLldpNeighbor *
nm_lldp_neighbor_new (void
);
Creates a new NMLldpNeighbor object.
Note that NMLldpNeighbor has no public API for mutating an instance. Also, libnm will not internally mutate a once exposed object. They are guaranteed to be immutable.
Since 1.32, ref-counting of NMLldpNeighbor is thread-safe.
This function is not useful, as there is no public API to actually modify the (empty) instance.
Since: 1.2
gboolean nm_lldp_neighbor_get_attr_string_value (NMLldpNeighbor *neighbor
,const char *name
,const char **out_value
);
Gets the string value of attribute with name name
on neighbor
neighbor |
the NMLldpNeighbor |
|
name |
the attribute name |
|
out_value |
on return, the attribute value. |
[out][optional][nullable][transfer none] |
Since: 1.2
gboolean nm_lldp_neighbor_get_attr_uint_value (NMLldpNeighbor *neighbor
,const char *name
,guint *out_value
);
Gets the uint32 value of attribute with name name
on neighbor
neighbor |
the NMLldpNeighbor |
|
name |
the attribute name |
|
out_value |
on return, the attribute value. |
[out][optional] |
Since: 1.2
const GVariantType * nm_lldp_neighbor_get_attr_type (NMLldpNeighbor *neighbor
,const char *name
);
Get the type of an attribute.
Since: 1.2
#define NM_DEVICE_AUTOCONNECT "autoconnect"
NM_DEVICE_AUTOCONNECT
is deprecated and should not be used in newly-written code.
typedef struct _NMLldpNeighbor NMLldpNeighbor;
Supported attributes are:
NM_LLDP_ATTR_CHASSIS_ID_TYPE (type: 'u')
NM_LLDP_ATTR_CHASSIS_ID (type: 's')
NM_LLDP_ATTR_DESTINATION (type: 's')
NM_LLDP_ATTR_IEEE_802_1_PPVID (type: 'u'). This attribute only reports the first PPVID and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_PPVIDS which reports all the PPVID.
NM_LLDP_ATTR_IEEE_802_1_PPVID_FLAGS (type: 'u'). This attribute only reports the first PPVID and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_PPVIDS which reports all the PPVID.
NM_LLDP_ATTR_IEEE_802_1_PPVIDS (type: 'aa{sv}')
An array of dictionaries where each element has keys:
flags (type: 'u')
ppvid (type: 'u')
NM_LLDP_ATTR_IEEE_802_1_PVID (type: 'u')
NM_LLDP_ATTR_IEEE_802_1_VID (type: 'u'). This attribute only reports the first VLAN and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_VLANS which reports all the VLANs.
NM_LLDP_ATTR_IEEE_802_1_VLAN_NAME (type: 's'). This attribute only reports the first VLAN and therefore it is deprecated in favor of NM_LLDP_ATTR_IEEE_802_1_VLANS which reports all the VLANs.
NM_LLDP_ATTR_IEEE_802_1_VLANS (type: 'aa{sv}')
An array of dictionaries where each element has keys:
name (type: 's')
vid (type: 'u')
NM_LLDP_ATTR_IEEE_802_3_MAC_PHY_CONF (type: 'a{sv}')
Dictionary where each element has keys:
autoneg (type: 'u')
operational-mau-type (type: 'u')
pmd-autoneg-cap (type: 'u')
NM_LLDP_ATTR_IEEE_802_3_MAX_FRAME_SIZE (type: 'u')
NM_LLDP_ATTR_IEEE_802_3_POWER_VIA_MDI (type: 'a{sv}')
Dictionary where each element has keys:
mdi-power-support (type: 'u')
power-class (type: 'u')
pse-power-pair (type: 'u')
NM_LLDP_ATTR_MANAGEMENT_ADDRESSES (type: 'aa{sv}')
An array of dictionaries where each element has keys:
address (type: 'ay')
address-subtype (type: 'u')
interface-number (type: 'u')
interface-number-subtype (type: 'u')
object-id (type: 'ay')
NM_LLDP_ATTR_PORT_DESCRIPTION (type: 's')
NM_LLDP_ATTR_PORT_ID_TYPE (type: 'u')
NM_LLDP_ATTR_PORT_ID (type: 's')
NM_LLDP_ATTR_RAW (type: 'ay')
NM_LLDP_ATTR_SYSTEM_CAPABILITIES (type: 'u')
NM_LLDP_ATTR_SYSTEM_DESCRIPTION (type: 's')
NM_LLDP_ATTR_SYSTEM_NAME (type: 's')
“active-connection”
property“active-connection” NMActiveConnection *
The NMActiveConnection object that "owns" this device during activation.
Owner: NMDevice
Flags: Read
“autoconnect”
property “autoconnect” gboolean
Whether the device can auto-activate a connection.
The property setter is a synchronous D-Bus call. This is deprecated since 1.22.
Owner: NMDevice
Flags: Read / Write
Default value: FALSE
“available-connections”
property “available-connections” GPtrArray *
The available connections of the device
[type GPtrArray(NMRemoteConnection)]
Owner: NMDevice
Flags: Read
“capabilities”
property“capabilities” NMDeviceCapabilities
The capabilities of the device.
Owner: NMDevice
Flags: Read
“device-type”
property“device-type” NMDeviceType
The numeric type of the device.
Owner: NMDevice
Flags: Read
Default value: NM_DEVICE_TYPE_UNKNOWN
“dhcp4-config”
property“dhcp4-config” NMDhcpConfig *
The IPv4 NMDhcpConfig of the device.
Owner: NMDevice
Flags: Read
“dhcp6-config”
property“dhcp6-config” NMDhcpConfig *
The IPv6 NMDhcpConfig of the device.
Owner: NMDevice
Flags: Read
“driver”
property “driver” char *
The driver of the device.
Owner: NMDevice
Flags: Read
Default value: NULL
“driver-version”
property “driver-version” char *
The version of the device driver.
Owner: NMDevice
Flags: Read
Default value: NULL
“firmware-missing”
property “firmware-missing” gboolean
When TRUE
indicates the device is likely missing firmware required
for its operation.
Owner: NMDevice
Flags: Read
Default value: FALSE
“firmware-version”
property “firmware-version” char *
The firmware version of the device.
Owner: NMDevice
Flags: Read
Default value: NULL
“hw-address”
property “hw-address” char *
The hardware address of the device.
Owner: NMDevice
Flags: Read
Default value: NULL
Since: 1.24
“interface”
property “interface” char *
The interface of the device.
Owner: NMDevice
Flags: Read
Default value: NULL
“interface-flags”
property “interface-flags” guint
The interface flags.
Owner: NMDevice
Flags: Read
Default value: 0
Since: 1.22
“ip-interface”
property “ip-interface” char *
The IP interface of the device which should be used for all IP-related operations like addressing and routing.
Owner: NMDevice
Flags: Read
Default value: NULL
“ip4-config”
property“ip4-config” NMIPConfig *
The NMIP4Config of the device.
Owner: NMDevice
Flags: Read
“ip4-connectivity”
property“ip4-connectivity” NMConnectivityState
The IPv4 connectivity state of the device.
Owner: NMDevice
Flags: Read
Default value: NM_CONNECTIVITY_UNKNOWN
Since: 1.16
“ip6-config”
property“ip6-config” NMIPConfig *
The IPv6 NMIPConfig of the device.
Owner: NMDevice
Flags: Read
“ip6-connectivity”
property“ip6-connectivity” NMConnectivityState
The IPv6 connectivity state of the device.
Owner: NMDevice
Flags: Read
Default value: NM_CONNECTIVITY_UNKNOWN
Since: 1.16
“lldp-neighbors”
property “lldp-neighbors” GPtrArray *
The LLDP neighbors.
Owner: NMDevice
Flags: Read
“managed”
property “managed” gboolean
Whether the device is managed by NetworkManager.
Owner: NMDevice
Flags: Read
Default value: FALSE
“metered”
property “metered” guint
Whether the device is metered.
Owner: NMDevice
Flags: Read
Default value: 0
Since: 1.2
“nm-plugin-missing”
property “nm-plugin-missing” gboolean
When TRUE
indicates that the NetworkManager plugin for the device
is not installed.
Owner: NMDevice
Flags: Read
Default value: FALSE
Since: 1.2
“path”
property “path” char *
The device path as exposed by the udev property ID_PATH.
The string is backslash escaped (C escaping) for invalid
characters. The escaping can be reverted with g_strcompress()
,
however the result may not be valid UTF-8.
Owner: NMDevice
Flags: Read
Default value: NULL
Since: 1.26
“physical-port-id”
property “physical-port-id” char *
The physical port ID of the device. (See
nm_device_get_physical_port_id()
.)
Owner: NMDevice
Flags: Read
Default value: NULL
“ports”
property “ports” GPtrArray *
The port devices of the controller device. For devices that cannot be controllers this is likely to be always empty.
Owner: NMDevice
Flags: Read
Since: 1.34
“product”
property “product” char *
The product string of the device.
Owner: NMDevice
Flags: Read
Default value: NULL
“real”
property “real” gboolean
Whether the device is real or is a placeholder device that could be created automatically by NetworkManager if one of its “available-connections” was activated.
Owner: NMDevice
Flags: Read
Default value: FALSE
Since: 1.2
“state”
property“state” NMDeviceState
The state of the device.
Owner: NMDevice
Flags: Read
Default value: NM_DEVICE_STATE_UNKNOWN
“state-reason”
property “state-reason” guint
The reason for the device state.
Owner: NMDevice
Flags: Read
Default value: 0
“udi”
property “udi” char *
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.
Owner: NMDevice
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