org.virtualbox_6_1
Class IDHCPServer

java.lang.Object
  extended by org.virtualbox_6_1.IUnknown
      extended by org.virtualbox_6_1.IDHCPServer

public class IDHCPServer
extends IUnknown

The IDHCPServer interface represents the VirtualBox DHCP server configuration. To enumerate all the DHCP servers on the host, use theIVirtualBox.getDHCPServers()attribute. Interface ID: {CADEF0A2-A1A9-4AC2-8E80-C049AF69DAC8}


Field Summary
 
Fields inherited from class org.virtualbox_6_1.IUnknown
obj, objMgr, port
 
Constructor Summary
IDHCPServer(java.lang.String wrapped, org.virtualbox_6_1.ObjectRefManager objMgr, org.virtualbox_6_1.jaxws.VboxPortType port)
           
 
Method Summary
 void findLeaseByMAC(java.lang.String mac, java.lang.Integer type, Holder<java.lang.String> address, Holder<java.lang.String> state, Holder<java.lang.Long> issued, Holder<java.lang.Long> expire)
          Queries the persistent lease database by MAC address.
 IDHCPConfig getConfig(DHCPConfigScope scope, java.lang.String name, java.lang.Long slot, java.lang.Boolean mayAdd)
          Gets or adds a configuration.
 java.lang.Boolean getEnabled()
          specifies if the DHCP server is enabled
 IEventSource getEventSource()
           
 IDHCPGlobalConfig getGlobalConfig()
          Global configuration that applies to all clients.
 java.util.List<IDHCPGroupConfig> getGroupConfigs()
          Configuration groups that applies to selected clients, selection is flexible.
 java.util.List<IDHCPIndividualConfig> getIndividualConfigs()
          Individual NIC configurations either by MAC address or VM + NIC number.
 java.lang.String getIPAddress()
          specifies server IP
 java.lang.String getLowerIP()
          specifies from IP address in server address range
 java.lang.String getNetworkMask()
          specifies server network mask
 java.lang.String getNetworkName()
          specifies internal network name the server is used for
 java.lang.String getUpperIP()
          specifies to IP address in server address range
static IDHCPServer queryInterface(IUnknown obj)
           
 void restart()
          Restart running DHCP server process.
 void setConfiguration(java.lang.String IPAddress, java.lang.String networkMask, java.lang.String FromIPAddress, java.lang.String ToIPAddress)
          configures the server
 void setEnabled(java.lang.Boolean value)
          specifies if the DHCP server is enabled
 void start(java.lang.String trunkName, java.lang.String trunkType)
          Starts DHCP server process.
 void stop()
          Stops DHCP server process.
 
Methods inherited from class org.virtualbox_6_1.IUnknown
getObjMgr, getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDHCPServer

public IDHCPServer(java.lang.String wrapped,
                   org.virtualbox_6_1.ObjectRefManager objMgr,
                   org.virtualbox_6_1.jaxws.VboxPortType port)
Method Detail

getEventSource

public IEventSource getEventSource()

getEnabled

public java.lang.Boolean getEnabled()
specifies if the DHCP server is enabled

Returns:
Boolean

setEnabled

public void setEnabled(java.lang.Boolean value)
specifies if the DHCP server is enabled

Parameters:
value - Boolean

getIPAddress

public java.lang.String getIPAddress()
specifies server IP

Returns:
String

getNetworkMask

public java.lang.String getNetworkMask()
specifies server network mask

Returns:
String

getNetworkName

public java.lang.String getNetworkName()
specifies internal network name the server is used for

Returns:
String

getLowerIP

public java.lang.String getLowerIP()
specifies from IP address in server address range

Returns:
String

getUpperIP

public java.lang.String getUpperIP()
specifies to IP address in server address range

Returns:
String

getGlobalConfig

public IDHCPGlobalConfig getGlobalConfig()
Global configuration that applies to all clients.

Returns:
org.virtualbox_6_1.IDHCPGlobalConfig

getGroupConfigs

public java.util.List<IDHCPGroupConfig> getGroupConfigs()
Configuration groups that applies to selected clients, selection is flexible.

Returns:
List<org.virtualbox_6_1.IDHCPGroupConfig>

getIndividualConfigs

public java.util.List<IDHCPIndividualConfig> getIndividualConfigs()
Individual NIC configurations either by MAC address or VM + NIC number.

Returns:
List<org.virtualbox_6_1.IDHCPIndividualConfig>

queryInterface

public static IDHCPServer queryInterface(IUnknown obj)

setConfiguration

public void setConfiguration(java.lang.String IPAddress,
                             java.lang.String networkMask,
                             java.lang.String FromIPAddress,
                             java.lang.String ToIPAddress)
configures the server

Parameters:
IPAddress - server IP address
networkMask - server network mask
FromIPAddress - server From IP address for address range
ToIPAddress - server To IP address for address range Expected result codes:
E_INVALIDARGinvalid configuration supplied

start

public void start(java.lang.String trunkName,
                  java.lang.String trunkType)
Starts DHCP server process.

Parameters:
trunkName - Name of internal network trunk.
trunkType - Type of internal network trunk. Expected result codes:
E_FAILFailed to start the process.

stop

public void stop()
Stops DHCP server process. Expected result codes:
E_FAILFailed to stop the process.


restart

public void restart()
Restart running DHCP server process. Expected result codes:
E_FAILFailed to restart the process.


findLeaseByMAC

public void findLeaseByMAC(java.lang.String mac,
                           java.lang.Integer type,
                           Holder<java.lang.String> address,
                           Holder<java.lang.String> state,
                           Holder<java.lang.Long> issued,
                           Holder<java.lang.Long> expire)
Queries the persistent lease database by MAC address. This is handy if the host wants to connect to a server running inside a VM on a host only network.

Parameters:
mac - The MAC address to look up.
type - Reserved, MBZ.
address - The assigned address.
state - The lease state.
issued - Timestamp of when the lease was issued, in seconds since 1970-01-01 UTC.
expire - Timestamp of when the lease expires/expired, in seconds since 1970-01-01 UTC. Expected result codes:
VBOX_E_OBJECT_NOT_FOUNDIf MAC address not in the database.
VBOX_E_FILE_ERRORIf not able to read the lease database file.

getConfig

public IDHCPConfig getConfig(DHCPConfigScope scope,
                             java.lang.String name,
                             java.lang.Long slot,
                             java.lang.Boolean mayAdd)
Gets or adds a configuration.

Parameters:
scope - The kind of configuration being sought or added.
name - Meaning depends on the scope: - Ignored when the scope isDHCPConfigScope.Global. - A VM name or UUID forDHCPConfigScope.MachineNIC. - A MAC address forDHCPConfigScope.MAC. - A group name forDHCPConfigScope.Group.
slot - The NIC slot when scope is set toDHCPConfigScope.MachineNIC, must be zero for all other scope values.
mayAdd - Set to TRUE if the configuration should be added if not found. If set to FALSE the method will fail with VBOX_E_OBJECT_NOT_FOUND.
Returns:
The requested configuration.