NMDeviceBridge

NMDeviceBridge

Synopsis

enum                NMDeviceBridgeError;
#define             NM_DEVICE_BRIDGE_ERROR
GQuark              nm_device_bridge_error_quark        (void);
#define             NM_DEVICE_BRIDGE_HW_ADDRESS
#define             NM_DEVICE_BRIDGE_CARRIER
#define             NM_DEVICE_BRIDGE_SLAVES
                    NMDeviceBridge;
GObject *           nm_device_bridge_new                (DBusGConnection *connection,
                                                         const char *path);
const char *        nm_device_bridge_get_hw_address     (NMDeviceBridge *device);
gboolean            nm_device_bridge_get_carrier        (NMDeviceBridge *device);
const GPtrArray *   nm_device_bridge_get_slaves         (NMDeviceBridge *device);

Object Hierarchy

  GObject
   +----NMObject
         +----NMDevice
               +----NMDeviceBridge

Properties

  "carrier"                  gboolean              : Read
  "hw-address"               gchar*                : Read
  "slaves"                   nm-object-array*      : Read

Description

Details

enum NMDeviceBridgeError

typedef enum {
	NM_DEVICE_BRIDGE_ERROR_UNKNOWN = 0,               /*< nick=UnknownError >*/
	NM_DEVICE_BRIDGE_ERROR_NOT_BRIDGE_CONNECTION,     /*< nick=NotBridgeConnection >*/
	NM_DEVICE_BRIDGE_ERROR_INVALID_BRIDGE_CONNECTION, /*< nick=InvalidBridgeConnection >*/
	NM_DEVICE_BRIDGE_ERROR_INTERFACE_MISMATCH,        /*< nick=InterfaceMismatch >*/
} NMDeviceBridgeError;

NM_DEVICE_BRIDGE_ERROR_UNKNOWN

unknown or unclassified error

NM_DEVICE_BRIDGE_ERROR_NOT_BRIDGE_CONNECTION

the connection was not of bridge type

NM_DEVICE_BRIDGE_ERROR_INVALID_BRIDGE_CONNECTION

the bridge connection was invalid

NM_DEVICE_BRIDGE_ERROR_INTERFACE_MISMATCH

the interfaces of the connection and the device mismatched

NM_DEVICE_BRIDGE_ERROR

#define NM_DEVICE_BRIDGE_ERROR nm_device_bridge_error_quark ()


nm_device_bridge_error_quark ()

GQuark              nm_device_bridge_error_quark        (void);

Registers an error quark for NMDeviceBridge if necessary.

Returns :

the error quark used for NMDeviceBridge errors.

NM_DEVICE_BRIDGE_HW_ADDRESS

#define NM_DEVICE_BRIDGE_HW_ADDRESS  "hw-address"


NM_DEVICE_BRIDGE_CARRIER

#define NM_DEVICE_BRIDGE_CARRIER     "carrier"


NM_DEVICE_BRIDGE_SLAVES

#define NM_DEVICE_BRIDGE_SLAVES      "slaves"


NMDeviceBridge

typedef struct _NMDeviceBridge NMDeviceBridge;


nm_device_bridge_new ()

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

Creates a new NMDeviceBridge.

connection :

the DBusGConnection

path :

the DBus object path of the device

Returns :

a new device

nm_device_bridge_get_hw_address ()

const char *        nm_device_bridge_get_hw_address     (NMDeviceBridge *device);

Gets the hardware (MAC) address of the NMDeviceBridge

device :

a NMDeviceBridge

Returns :

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

nm_device_bridge_get_carrier ()

gboolean            nm_device_bridge_get_carrier        (NMDeviceBridge *device);

Whether the device has carrier.

device :

a NMDeviceBridge

Returns :

TRUE if the device has carrier

nm_device_bridge_get_slaves ()

const GPtrArray *   nm_device_bridge_get_slaves         (NMDeviceBridge *device);

Gets the devices currently slaved to device.

device :

a NMDeviceBridge

Returns :

element-type NMClient.Device. element-type NMClient.Device.

Property Details

The "carrier" property

  "carrier"                  gboolean              : Read

Whether the device has carrier.

Default value: FALSE


The "hw-address" property

  "hw-address"               gchar*                : Read

The hardware (MAC) address of the device.

Default value: NULL


The "slaves" property

  "slaves"                   nm-object-array*      : Read

The devices (NMDevice) slaved to the bridge device.