Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/VBox/Main/idl/VirtualBox.xidl
Original file line number Diff line number Diff line change
Expand Up @@ -2539,6 +2539,12 @@
</desc>
</attribute>

<attribute name="running" type="boolean" readonly="yes">
<desc>
specifies if the DHCP server is running
</desc>
</attribute>

<attribute name="IPAddress" type="wstring" readonly="yes">
<desc>
specifies server IP
Expand Down
1 change: 1 addition & 0 deletions src/VBox/Main/include/DHCPServerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class ATL_NO_VTABLE DHCPServer
HRESULT getEventSource(ComPtr<IEventSource> &aEventSource) RT_OVERRIDE;
HRESULT getEnabled(BOOL *aEnabled) RT_OVERRIDE;
HRESULT setEnabled(BOOL aEnabled) RT_OVERRIDE;
HRESULT getRunning(BOOL *aRunning) RT_OVERRIDE;
HRESULT getIPAddress(com::Utf8Str &aIPAddress) RT_OVERRIDE;
HRESULT getNetworkMask(com::Utf8Str &aNetworkMask) RT_OVERRIDE;
HRESULT getNetworkName(com::Utf8Str &aName) RT_OVERRIDE;
Expand Down
8 changes: 8 additions & 0 deletions src/VBox/Main/src-server/DHCPServerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,14 @@ HRESULT DHCPServer::setEnabled(BOOL aEnabled)
}


HRESULT DHCPServer::getRunning(BOOL *aRunning)
{
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
*aRunning = m->dhcp.isRunning();
return S_OK;
}


HRESULT DHCPServer::getIPAddress(com::Utf8Str &aIPAddress)
{
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
Expand Down