Helper class to get all existing Linux network interfaces.
OMV\System\Net\NetworkInterfaceBackend\Manager::assertBackendExists |
( |
|
$deviceName | ) |
|
|
final |
Assert that a backend for the given network interface exists.
- Parameters
-
deviceName | Specifies the device name, e.g.
eth0
|
- Exceptions
-
OMV\System\Net\NetworkInterfaceBackend\Manager::enumerate |
( |
|
$type = OMV_NETWORK_INTERFACE_TYPE_ALL | ) |
|
|
final |
Enumerate all network interfaces.
- Parameters
-
type | Defines 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
-
type | Defines 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
-
type | Defines 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
-
deviceName | Specifies the device name, e.g.
eth0
|
- 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
-
deviceName | Specifies the device name, e.g.
eth0
|
- 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
-
deviceName | Specifies the device name, e.g.
eth0
|
type | Defines 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
-
backend | The storage device backend object to register. |
- Returns
- TRUE if successful, otherwise FALSE.
The documentation for this class was generated from the following file:
- system/net/networkinterfacebackend/manager.inc