OpenMediaVault  3.0 (Erasmus)
The open network attached storage solution
Public Member Functions | Static Public Member Functions | List of all members
OMV\System\Net\NetworkInterfaceBackend\Manager Class Reference
Inheritance diagram for OMV\System\Net\NetworkInterfaceBackend\Manager:

Public Member Functions

 getIterator ()
 
 registerBackend (BackendAbstract $backend)
 
 getBackend ($deviceName)
 
 assertBackendExists ($deviceName)
 
 enumerate ($type=OMV_NETWORK_INTERFACE_TYPE_ALL)
 
 enumerateUnused ($type=OMV_NETWORK_INTERFACE_TYPE_ALL)
 
 enumerateUsed ($type=OMV_NETWORK_INTERFACE_TYPE_ALL)
 
 isUsed ($deviceName, $type=OMV_NETWORK_INTERFACE_TYPE_ALL)
 
 getImpl ($deviceName)
 

Static Public Member Functions

static & getInstance ()
 

Detailed Description

Helper class to get all existing Linux network interfaces.

Member Function Documentation

OMV\System\Net\NetworkInterfaceBackend\Manager::assertBackendExists (   $deviceName)
final

Assert that a backend for the given network interface exists.

Parameters
deviceNameSpecifies the device name, e.g.
eth0
  • wlan2
  • eth2.1
  • bond0
Exceptions
OMV\System\Net\NetworkInterfaceBackend\Manager::enumerate (   $type = OMV_NETWORK_INTERFACE_TYPE_ALL)
final

Enumerate all network interfaces.

Parameters
typeDefines the network interface type, e.g. ethernet, vlan or bond. Defaults to OMV_NETWORK_INTERFACE_TYPE_ALL.
Returns
A list of network interfaces, e.g. eth0 or lo, otherwise FALSE.
OMV\System\Net\NetworkInterfaceBackend\Manager::enumerateUnused (   $type = OMV_NETWORK_INTERFACE_TYPE_ALL)
final

Enumerate all unused devices. This list contains all devices of the given type except the devices that are used by other network interfaces (e.g. bond interfaces).

Parameters
typeDefines the network interface type. Defaults to OMV_NETWORK_INTERFACE_TYPE_ALL.
Returns
A list of network interfaces, otherwise FALSE.
OMV\System\Net\NetworkInterfaceBackend\Manager::enumerateUsed (   $type = OMV_NETWORK_INTERFACE_TYPE_ALL)
final

Enumerate all used devices. The list contains all those devices that are used by the given network interfaces, e.g. all members of a bond interface.

Parameters
typeDefines the network interface type. Defaults to OMV_NETWORK_INTERFACE_TYPE_ALL.
Returns
A list of network interfaces, otherwise FALSE.
OMV\System\Net\NetworkInterfaceBackend\Manager::getBackend (   $deviceName)
final

Get the backend of the given network interface.

Parameters
deviceNameSpecifies the device name, e.g.
eth0
  • wlan2
  • eth2.1
  • bond0
Returns
The backend that implements the given device, otherwise NULL.
OMV\System\Net\NetworkInterfaceBackend\Manager::getImpl (   $deviceName)
final

Get the object of the class implementing the given filesystem.

Parameters
deviceNameSpecifies the device name, e.g.
eth0
  • wlan2
  • eth2.1
  • bond0
Returns
The object of the class implementing the given network interface, otherwise NULL.
static& OMV\System\Net\NetworkInterfaceBackend\Manager::getInstance ( )
static

Returns a manager singleton.

Returns
The manager object.
OMV\System\Net\NetworkInterfaceBackend\Manager::isUsed (   $deviceName,
  $type = OMV_NETWORK_INTERFACE_TYPE_ALL 
)
final

Check if the given device is used by another network interface.

Parameters
deviceNameSpecifies the device name, e.g.
eth0
  • wlan2
  • eth2.1
  • bond0
typeDefines the network interface type. Defaults to OMV_NETWORK_INTERFACE_TYPE_ALL.
Returns
TRUE if the given device is used by another network interface, otherwise FALSE.
OMV\System\Net\NetworkInterfaceBackend\Manager::registerBackend ( BackendAbstract  $backend)
final

Register a storage device backend.

Parameters
backendThe storage device backend object to register.
Returns
TRUE if successful, otherwise FALSE.

The documentation for this class was generated from the following file: