|
Packit Service |
b23acc |
// SPDX-License-Identifier: LGPL-2.1+
|
|
Packit Service |
b23acc |
/*
|
|
Packit Service |
b23acc |
* Copyright (C) 2007 - 2008 Novell, Inc.
|
|
Packit Service |
b23acc |
* Copyright (C) 2007 - 2013 Red Hat, Inc.
|
|
Packit Service |
b23acc |
*/
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#ifndef __NM_DEVICE_H__
|
|
Packit Service |
b23acc |
#define __NM_DEVICE_H__
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
|
|
Packit Service |
b23acc |
#error "Only <NetworkManager.h> can be included directly."
|
|
Packit Service |
b23acc |
#endif
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#include "nm-object.h"
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
G_BEGIN_DECLS
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#define NM_TYPE_DEVICE (nm_device_get_type ())
|
|
Packit Service |
b23acc |
#define NM_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE, NMDevice))
|
|
Packit Service |
b23acc |
#define NM_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE, NMDeviceClass))
|
|
Packit Service |
b23acc |
#define NM_IS_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE))
|
|
Packit Service |
b23acc |
#define NM_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE))
|
|
Packit Service |
b23acc |
#define NM_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE, NMDeviceClass))
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#define NM_DEVICE_DEVICE_TYPE "device-type"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_UDI "udi"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_PATH "path"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_INTERFACE "interface"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_IP_INTERFACE "ip-interface"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_DRIVER "driver"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_DRIVER_VERSION "driver-version"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_FIRMWARE_VERSION "firmware-version"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_CAPABILITIES "capabilities"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_REAL "real"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_MANAGED "managed"
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
_NM_DEPRECATED_SYNC_WRITABLE_PROPERTY
|
|
Packit Service |
b23acc |
#define NM_DEVICE_AUTOCONNECT "autoconnect"
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#define NM_DEVICE_FIRMWARE_MISSING "firmware-missing"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_NM_PLUGIN_MISSING "nm-plugin-missing"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_IP4_CONFIG "ip4-config"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_DHCP4_CONFIG "dhcp4-config"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_IP6_CONFIG "ip6-config"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_DHCP6_CONFIG "dhcp6-config"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_STATE "state"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_STATE_REASON "state-reason"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_ACTIVE_CONNECTION "active-connection"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_AVAILABLE_CONNECTIONS "available-connections"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_VENDOR "vendor"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_PRODUCT "product"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_PHYSICAL_PORT_ID "physical-port-id"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_MTU "mtu"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_METERED "metered"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_LLDP_NEIGHBORS "lldp-neighbors"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_IP4_CONNECTIVITY "ip4-connectivity"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_IP6_CONNECTIVITY "ip6-connectivity"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_INTERFACE_FLAGS "interface-flags"
|
|
Packit Service |
b23acc |
#define NM_DEVICE_HW_ADDRESS "hw-address"
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
/**
|
|
Packit Service |
b23acc |
* NMDevice:
|
|
Packit Service |
b23acc |
*/
|
|
Packit Service |
b23acc |
typedef struct _NMDeviceClass NMDeviceClass;
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
typedef struct _NMLldpNeighbor NMLldpNeighbor;
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
GType nm_device_get_type (void);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
const char * nm_device_get_iface (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_ip_iface (NMDevice *device);
|
|
Packit Service |
b23acc |
NMDeviceType nm_device_get_device_type (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_udi (NMDevice *device);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
b23acc |
const char * nm_device_get_path (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_driver (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_driver_version (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_firmware_version (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_type_description (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_hw_address (NMDevice *device);
|
|
Packit Service |
b23acc |
NMDeviceCapabilities nm_device_get_capabilities (NMDevice *device);
|
|
Packit Service |
b23acc |
gboolean nm_device_get_managed (NMDevice *device);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
NM_DEPRECATED_IN_1_22
|
|
Packit Service |
b23acc |
_NM_DEPRECATED_SYNC_METHOD
|
|
Packit Service |
b23acc |
void nm_device_set_managed (NMDevice *device, gboolean managed);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
gboolean nm_device_get_autoconnect (NMDevice *device);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
NM_DEPRECATED_IN_1_22
|
|
Packit Service |
b23acc |
_NM_DEPRECATED_SYNC_METHOD
|
|
Packit Service |
b23acc |
void nm_device_set_autoconnect (NMDevice *device, gboolean autoconnect);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
gboolean nm_device_get_firmware_missing (NMDevice *device);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
gboolean nm_device_get_nm_plugin_missing (NMDevice *device);
|
|
Packit Service |
b23acc |
NMIPConfig * nm_device_get_ip4_config (NMDevice *device);
|
|
Packit Service |
b23acc |
NMDhcpConfig * nm_device_get_dhcp4_config (NMDevice *device);
|
|
Packit Service |
b23acc |
NMIPConfig * nm_device_get_ip6_config (NMDevice *device);
|
|
Packit Service |
b23acc |
NMDhcpConfig * nm_device_get_dhcp6_config (NMDevice *device);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_16
|
|
Packit Service |
b23acc |
NMConnectivityState nm_device_get_connectivity (NMDevice *device, int addr_family);
|
|
Packit Service |
b23acc |
NMDeviceState nm_device_get_state (NMDevice *device);
|
|
Packit Service |
b23acc |
NMDeviceStateReason nm_device_get_state_reason (NMDevice *device);
|
|
Packit Service |
b23acc |
NMActiveConnection * nm_device_get_active_connection(NMDevice *device);
|
|
Packit Service |
b23acc |
const GPtrArray * nm_device_get_available_connections(NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_physical_port_id (NMDevice *device);
|
|
Packit Service |
b23acc |
guint32 nm_device_get_mtu (NMDevice *device);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
gboolean nm_device_is_real (NMDevice *device);
|
|
Packit Service |
b23acc |
gboolean nm_device_is_software (NMDevice *device);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
const char * nm_device_get_product (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_vendor (NMDevice *device);
|
|
Packit Service |
b23acc |
const char * nm_device_get_description (NMDevice *device);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
NMMetered nm_device_get_metered (NMDevice *device);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
GPtrArray * nm_device_get_lldp_neighbors (NMDevice *device);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_22
|
|
Packit Service |
b23acc |
NMDeviceInterfaceFlags nm_device_get_interface_flags (NMDevice *device);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
char ** nm_device_disambiguate_names (NMDevice **devices,
|
|
Packit Service |
b23acc |
int num_devices);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
_NM_DEPRECATED_SYNC_METHOD
|
|
Packit Service |
b23acc |
gboolean nm_device_reapply (NMDevice *device,
|
|
Packit Service |
b23acc |
NMConnection *connection,
|
|
Packit Service |
b23acc |
guint64 version_id,
|
|
Packit Service |
b23acc |
guint32 flags,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
void nm_device_reapply_async (NMDevice *device,
|
|
Packit Service |
b23acc |
NMConnection *connection,
|
|
Packit Service |
b23acc |
guint64 version_id,
|
|
Packit Service |
b23acc |
guint32 flags,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GAsyncReadyCallback callback,
|
|
Packit Service |
b23acc |
gpointer user_data);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
gboolean nm_device_reapply_finish (NMDevice *device,
|
|
Packit Service |
b23acc |
GAsyncResult *result,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
_NM_DEPRECATED_SYNC_METHOD
|
|
Packit Service |
b23acc |
NMConnection *nm_device_get_applied_connection (NMDevice *device,
|
|
Packit Service |
b23acc |
guint32 flags,
|
|
Packit Service |
b23acc |
guint64 *version_id,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
void nm_device_get_applied_connection_async (NMDevice *device,
|
|
Packit Service |
b23acc |
guint32 flags,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GAsyncReadyCallback callback,
|
|
Packit Service |
b23acc |
gpointer user_data);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
NMConnection *nm_device_get_applied_connection_finish (NMDevice *device,
|
|
Packit Service |
b23acc |
GAsyncResult *result,
|
|
Packit Service |
b23acc |
guint64 *version_id,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
_NM_DEPRECATED_SYNC_METHOD
|
|
Packit Service |
b23acc |
gboolean nm_device_disconnect (NMDevice *device,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
void nm_device_disconnect_async (NMDevice *device,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GAsyncReadyCallback callback,
|
|
Packit Service |
b23acc |
gpointer user_data);
|
|
Packit Service |
b23acc |
gboolean nm_device_disconnect_finish (NMDevice *device,
|
|
Packit Service |
b23acc |
GAsyncResult *result,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
_NM_DEPRECATED_SYNC_METHOD
|
|
Packit Service |
b23acc |
gboolean nm_device_delete (NMDevice *device,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
void nm_device_delete_async (NMDevice *device,
|
|
Packit Service |
b23acc |
GCancellable *cancellable,
|
|
Packit Service |
b23acc |
GAsyncReadyCallback callback,
|
|
Packit Service |
b23acc |
gpointer user_data);
|
|
Packit Service |
b23acc |
gboolean nm_device_delete_finish (NMDevice *device,
|
|
Packit Service |
b23acc |
GAsyncResult *result,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
GPtrArray * nm_device_filter_connections (NMDevice *device,
|
|
Packit Service |
b23acc |
const GPtrArray *connections);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
gboolean nm_device_connection_valid (NMDevice *device,
|
|
Packit Service |
b23acc |
NMConnection *connection);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
gboolean nm_device_connection_compatible (NMDevice *device,
|
|
Packit Service |
b23acc |
NMConnection *connection,
|
|
Packit Service |
b23acc |
GError **error);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
GType nm_device_get_setting_type (NMDevice *device);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
GType nm_lldp_neighbor_get_type (void);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
NMLldpNeighbor *nm_lldp_neighbor_new (void);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
void nm_lldp_neighbor_ref (NMLldpNeighbor *neighbor);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
void nm_lldp_neighbor_unref (NMLldpNeighbor *neighbor);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
char **nm_lldp_neighbor_get_attr_names (NMLldpNeighbor *neighbor);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
gboolean nm_lldp_neighbor_get_attr_string_value (NMLldpNeighbor *neighbor, const char *name,
|
|
Packit Service |
b23acc |
const char **out_value);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
gboolean nm_lldp_neighbor_get_attr_uint_value (NMLldpNeighbor *neighbor, const char *name,
|
|
Packit Service |
b23acc |
guint *out_value);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
b23acc |
const GVariantType *nm_lldp_neighbor_get_attr_type (NMLldpNeighbor *neighbor, const char *name);
|
|
Packit Service |
b23acc |
NM_AVAILABLE_IN_1_18
|
|
Packit Service |
b23acc |
GVariant *nm_lldp_neighbor_get_attr_value (NMLldpNeighbor *neighbor, const char *name);
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
G_END_DECLS
|
|
Packit Service |
b23acc |
|
|
Packit Service |
b23acc |
#endif /* __NM_DEVICE_H__ */
|