VirtualBox Main API
Public Member Functions | Public Attributes | List of all members
IDHCPConfig Interface Reference

The DHCP server has several configuration levels: global, group and individual MAC. More...

Inheritance diagram for IDHCPConfig:
IDHCPGlobalConfig IDHCPGroupConfig IDHCPIndividualConfig

Public Member Functions

void setOption (in DHCPOption option, in DHCPOptionEncoding encoding, in wstring value)
 Sets a DHCP option.
 
void removeOption (in DHCPOption option)
 Removes the given DHCP option.
 
void removeAllOptions ()
 Removes all the options.
 
void getOption (in DHCPOption option, out DHCPOptionEncoding encoding, [retval] out wstring value)
 Gets the value of a single DHCP option.
 
void getAllOptions (out DHCPOption[] options, out DHCPOptionEncoding[] encodings, [retval] out wstring[] values)
 Gets all DHCP options and their values.
 
void remove ()
 Remove this group or individual configuration.
 

Public Attributes

readonly attribute DHCPConfigScope scope
 Indicates the kind of config this is (mostly for IDHCPIndividualConfig).
 
attribute unsigned long minLeaseTime
 The minimum lease time in seconds, ignored if zero.
 
attribute unsigned long defaultLeaseTime
 The default lease time in seconds, ignored if zero.
 
attribute unsigned long maxLeaseTime
 The maximum lease time in seconds, ignored if zero.
 
attribute DHCPOption[] forcedOptions
 List of DHCP options which should be forced upon the clients in this config scope when they are available, whether the clients asks for them or not.
 
attribute DHCPOption[] suppressedOptions
 List of DHCP options which should not be sent to the clients in this config scope.
 

Detailed Description

The DHCP server has several configuration levels: global, group and individual MAC.

This interface implements the settings common to each level.

Interface ID:
{00F4A8DC-0002-4B81-0077-1DCB004571BA}

Member Function Documentation

◆ setOption()

void IDHCPConfig::setOption ( in DHCPOption  option,
in DHCPOptionEncoding  encoding,
in wstring  value 
)

Sets a DHCP option.

Parameters
optionThe DHCP option.
encodingThe value encoding.
valueThe DHCP option value. The exact format depends on the DHCP option value and encoding, see see DHCPOption for the DHCPOptionEncoding_Normal format.

◆ removeOption()

void IDHCPConfig::removeOption ( in DHCPOption  option)

Removes the given DHCP option.

◆ removeAllOptions()

void IDHCPConfig::removeAllOptions ( )

Removes all the options.

One exception here is the DhcpOpt_SubnetMask option in the global scope that is linked to the IDHCPServer::networkMask attribute and therefore cannot be removed.

◆ getOption()

void IDHCPConfig::getOption ( in DHCPOption  option,
out DHCPOptionEncoding  encoding,
[retval] out wstring  value 
)

Gets the value of a single DHCP option.

Parameters
optionThe DHCP option being sought.
encodingThe value encoding.
valueThe value of the requested DHCP option. The exact format depends on the DHCP option value and the encoding, see DHCPOption for the DHCPOptionEncoding_Normal format.

◆ getAllOptions()

void IDHCPConfig::getAllOptions ( out DHCPOption[]  options,
out DHCPOptionEncoding[]  encodings,
[retval] out wstring[]  values 
)

Gets all DHCP options and their values.

Parameters
optionsArray containing the DHCP option numbers.
encodingsArray of value encodings that runs parallel to options.
valuesArray of values that runs parallel to options and encodings. The format depends on both of those.

◆ remove()

void IDHCPConfig::remove ( )

Remove this group or individual configuration.

Will of course not work on global configurations.

Member Data Documentation

◆ scope

readonly attribute DHCPConfigScope IDHCPConfig::scope

Indicates the kind of config this is (mostly for IDHCPIndividualConfig).

◆ minLeaseTime

attribute unsigned long IDHCPConfig::minLeaseTime

The minimum lease time in seconds, ignored if zero.

◆ defaultLeaseTime

attribute unsigned long IDHCPConfig::defaultLeaseTime

The default lease time in seconds, ignored if zero.

◆ maxLeaseTime

attribute unsigned long IDHCPConfig::maxLeaseTime

The maximum lease time in seconds, ignored if zero.

◆ forcedOptions

attribute DHCPOption [] IDHCPConfig::forcedOptions

List of DHCP options which should be forced upon the clients in this config scope when they are available, whether the clients asks for them or not.

◆ suppressedOptions

attribute DHCPOption [] IDHCPConfig::suppressedOptions

List of DHCP options which should not be sent to the clients in this config scope.

This is intended for cases where one client or a group of clients shouldn't see one or more (typically global) options.