NMDeviceEthernet

NMDeviceEthernet

Synopsis

enum                NMDeviceEthernetError;
#define             NM_DEVICE_ETHERNET_ERROR
GQuark              nm_device_ethernet_error_quark      (void);
#define             NM_DEVICE_ETHERNET_HW_ADDRESS
#define             NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS
#define             NM_DEVICE_ETHERNET_SPEED
#define             NM_DEVICE_ETHERNET_CARRIER
GObject *           nm_device_ethernet_new              (DBusGConnection *connection,
                                                         const char *path);
const char *        nm_device_ethernet_get_hw_address   (NMDeviceEthernet *device);
const char *        nm_device_ethernet_get_permanent_hw_address
                                                        (NMDeviceEthernet *device);
guint32             nm_device_ethernet_get_speed        (NMDeviceEthernet *device);
gboolean            nm_device_ethernet_get_carrier      (NMDeviceEthernet *device);

Description

Details

enum NMDeviceEthernetError

typedef enum {
	NM_DEVICE_ETHERNET_ERROR_UNKNOWN = 0,                 /*< nick=UnknownError >*/
	NM_DEVICE_ETHERNET_ERROR_NOT_ETHERNET_CONNECTION,     /*< nick=NotEthernetConnection >*/
	NM_DEVICE_ETHERNET_ERROR_INVALID_ETHERNET_CONNECTION, /*< nick=InvalidEthernetConnection >*/
	NM_DEVICE_ETHERNET_ERROR_INVALID_DEVICE_MAC,          /*< nick=InvalidDeviceMac >*/
	NM_DEVICE_ETHERNET_ERROR_MAC_MISMATCH,                /*< nick=MacMismatch >*/
} NMDeviceEthernetError;

NM_DEVICE_ETHERNET_ERROR_UNKNOWN

unknown or unclassified error

NM_DEVICE_ETHERNET_ERROR_NOT_ETHERNET_CONNECTION

the connection was not of Ethernet or PPPoE type

NM_DEVICE_ETHERNET_ERROR_INVALID_ETHERNET_CONNECTION

the Ethernet connection was invalid

NM_DEVICE_ETHERNET_ERROR_INVALID_DEVICE_MAC

the device's MAC was invalid

NM_DEVICE_ETHERNET_ERROR_MAC_MISMATCH

the MACs of the connection and the device mismatched

NM_DEVICE_ETHERNET_ERROR

#define NM_DEVICE_ETHERNET_ERROR nm_device_ethernet_error_quark ()


nm_device_ethernet_error_quark ()

GQuark              nm_device_ethernet_error_quark      (void);

Registers an error quark for NMDeviceEthernet if necessary.

Returns :

the error quark used for NMDeviceEthernet errors.

NM_DEVICE_ETHERNET_HW_ADDRESS

#define NM_DEVICE_ETHERNET_HW_ADDRESS  "hw-address"


NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS

#define NM_DEVICE_ETHERNET_PERMANENT_HW_ADDRESS "perm-hw-address"


NM_DEVICE_ETHERNET_SPEED

#define NM_DEVICE_ETHERNET_SPEED       "speed"


NM_DEVICE_ETHERNET_CARRIER

#define NM_DEVICE_ETHERNET_CARRIER     "carrier"


nm_device_ethernet_new ()

GObject *           nm_device_ethernet_new              (DBusGConnection *connection,
                                                         const char *path);

Creates a new NMDeviceEthernet.

connection :

the DBusGConnection

path :

the DBus object path of the device

Returns :

a new device. [transfer full]

nm_device_ethernet_get_hw_address ()

const char *        nm_device_ethernet_get_hw_address   (NMDeviceEthernet *device);

Gets the active hardware (MAC) address of the NMDeviceEthernet

device :

a NMDeviceEthernet

Returns :

the active hardware address. This is the internal string used by the device, and must not be modified.

nm_device_ethernet_get_permanent_hw_address ()

const char *        nm_device_ethernet_get_permanent_hw_address
                                                        (NMDeviceEthernet *device);

Gets the permanent hardware (MAC) address of the NMDeviceEthernet

device :

a NMDeviceEthernet

Returns :

the permanent hardware address. This is the internal string used by the device, and must not be modified.

nm_device_ethernet_get_speed ()

guint32             nm_device_ethernet_get_speed        (NMDeviceEthernet *device);

Gets the speed of the NMDeviceEthernet.

device :

a NMDeviceEthernet

Returns :

the speed of the device

nm_device_ethernet_get_carrier ()

gboolean            nm_device_ethernet_get_carrier      (NMDeviceEthernet *device);

Whether the device has carrier.

device :

a NMDeviceEthernet

Returns :

TRUE if the device has carrier