VirtualBox

Changeset 17888 in vbox


Ignore:
Timestamp:
Mar 15, 2009 4:44:08 PM (16 years ago)
Author:
vboxsync
Message:

dhcp settings fixes

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r17886 r17888  
    780780                RTPrintf("NetworkMask:    %lS\n", netmask.raw());
    781781                Bstr lowerIp;
    782                 svr->COMGETTER(FromIPAddress)(lowerIp.asOutParam());
     782                svr->COMGETTER(LowerIP)(lowerIp.asOutParam());
    783783                RTPrintf("lowerIPAddress: %lS\n", lowerIp.raw());
    784784                Bstr upperIp;
    785                 svr->COMGETTER(ToIPAddress)(upperIp.asOutParam());
     785                svr->COMGETTER(UpperIP)(upperIp.asOutParam());
    786786                RTPrintf("upperIPAddress: %lS\n", upperIp.raw());
    787787                RTPrintf("\n");
  • trunk/src/VBox/Main/DhcpServerImpl.cpp

    r17887 r17888  
    4242}
    4343
     44void DhcpServer::uninit()
     45{
     46    mVirtualBox->removeDependentChild (this);
     47}
     48
    4449HRESULT DhcpServer::init(VirtualBox *aVirtualBox, IN_BSTR aName)
    4550{
     
    5661    m.networkMask = "0.0.0.0";
    5762    m.enabled = FALSE;
    58     m.FromIPAddress = "0.0.0.0";
    59     m.ToIPAddress = "0.0.0.0";
     63    m.lowerIP = "0.0.0.0";
     64    m.upperIP = "0.0.0.0";
    6065
    6166    /* register with VirtualBox early, since uninit() will
     
    8691    m.networkMask = aNode.stringValue ("networkMask");
    8792    m.enabled = aNode.value <BOOL> ("enabled");
    88     m.FromIPAddress = aNode.stringValue ("lowerIp");
    89     m.ToIPAddress = aNode.stringValue ("upperIp");
     93    m.lowerIP = aNode.stringValue ("lowerIP");
     94    m.upperIP = aNode.stringValue ("upperIP");
    9095
    9196    autoInitSpan.setSucceeded();
     
    110115    aNode.setValue <Bstr> ("IPAddress", m.IPAddress);
    111116    aNode.setValue <Bstr> ("networkMask", m.networkMask);
    112     aNode.setValue <Bstr> ("FromIPAddress", m.FromIPAddress);
    113     aNode.setValue <Bstr> ("ToIPAddress", m.ToIPAddress);
     117    aNode.setValue <Bstr> ("lowerIP", m.lowerIP);
     118    aNode.setValue <Bstr> ("upperIP", m.upperIP);
     119    aNode.setValue <BOOL> ("enabled", m.enabled);
    114120
    115121    return S_OK;
     
    183189}
    184190
    185 STDMETHODIMP DhcpServer::COMGETTER(FromIPAddress) (BSTR *aIPAddress)
     191STDMETHODIMP DhcpServer::COMGETTER(LowerIP) (BSTR *aIPAddress)
    186192{
    187193    CheckComArgOutPointerValid(aIPAddress);
     
    190196    CheckComRCReturnRC (autoCaller.rc());
    191197
    192     m.FromIPAddress.cloneTo(aIPAddress);
    193 
    194     return S_OK;
    195 
    196 }
    197 
    198 STDMETHODIMP DhcpServer::COMGETTER(ToIPAddress) (BSTR *aIPAddress)
     198    m.lowerIP.cloneTo(aIPAddress);
     199
     200    return S_OK;
     201
     202}
     203
     204STDMETHODIMP DhcpServer::COMGETTER(UpperIP) (BSTR *aIPAddress)
    199205{
    200206    CheckComArgOutPointerValid(aIPAddress);
     
    203209    CheckComRCReturnRC (autoCaller.rc());
    204210
    205     m.ToIPAddress.cloneTo(aIPAddress);
    206 
    207     return S_OK;
    208 
    209 }
    210 
    211 STDMETHODIMP DhcpServer::SetConfiguration (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress)
     211    m.upperIP.cloneTo(aIPAddress);
     212
     213    return S_OK;
     214
     215}
     216
     217STDMETHODIMP DhcpServer::SetConfiguration (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aLowerIP, IN_BSTR aUpperIP)
    212218{
    213219    AssertReturn (aIPAddress != NULL, E_INVALIDARG);
    214220    AssertReturn (aNetworkMask != NULL, E_INVALIDARG);
    215     AssertReturn (aFromIPAddress != NULL, E_INVALIDARG);
    216     AssertReturn (aToIPAddress != NULL, E_INVALIDARG);
     221    AssertReturn (aLowerIP != NULL, E_INVALIDARG);
     222    AssertReturn (aUpperIP != NULL, E_INVALIDARG);
    217223
    218224    AutoCaller autoCaller (this);
     
    224230    m.IPAddress = aIPAddress;
    225231    m.networkMask = aNetworkMask;
    226     m.FromIPAddress = aFromIPAddress;
    227     m.ToIPAddress = aToIPAddress;
     232    m.lowerIP = aLowerIP;
     233    m.upperIP = aUpperIP;
    228234
    229235    HRESULT rc = mVirtualBox->saveSettings();
    230236
    231     return rc;
    232 }
     237    return S_OK;
     238}
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r17886 r17888  
    47784778        return E_INVALIDARG;
    47794779    }
     4780    rc = S_OK;
    47804781
    47814782    mData.mDhcpServers.push_back (aDhcpServer);
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r17879 r17888  
    12201220  <interface
    12211221    name="IDhcpServer" extends="$unknown"
    1222     uuid="f6de19f7-f4b5-4d93-b3de-664729267a53"
     1222    uuid="ed5c8393-e245-476d-a272-b65063a5d542"
    12231223    wsmap="managed"
    12241224  >
     
    12541254    </attribute>
    12551255
    1256     <attribute name="FromIPAddress" type="wstring" readonly="yes">
     1256    <attribute name="lowerIP" type="wstring" readonly="yes">
    12571257      <desc>
    12581258        specifies from IP adrres in server address range
     
    12601260    </attribute>
    12611261
    1262     <attribute name="ToIPAddress" type="wstring" readonly="yes">
     1262    <attribute name="upperIP" type="wstring" readonly="yes">
    12631263      <desc>
    12641264        specifies to IP adrres in server address range
  • trunk/src/VBox/Main/include/DhcpServerImpl.h

    r17887 r17888  
    6464    HRESULT saveSettings (settings::Key &aParentNode);
    6565
     66    void uninit();
     67
    6668    // IDhcpServer properties
    6769    STDMETHOD(COMGETTER(NetworkName)) (BSTR *aName);
     
    7072    STDMETHOD(COMGETTER(IPAddress)) (BSTR *aIPAddress);
    7173    STDMETHOD(COMGETTER(NetworkMask)) (BSTR *aNetworkMask);
    72     STDMETHOD(COMGETTER(FromIPAddress)) (BSTR *aIPAddress);
    73     STDMETHOD(COMGETTER(ToIPAddress)) (BSTR *aIPAddress);
     74    STDMETHOD(COMGETTER(LowerIP)) (BSTR *aIPAddress);
     75    STDMETHOD(COMGETTER(UpperIP)) (BSTR *aIPAddress);
    7476
    7577    STDMETHOD(SetConfiguration) (IN_BSTR aIPAddress, IN_BSTR aNetworkMask, IN_BSTR aFromIPAddress, IN_BSTR aToIPAddress);
     
    9092        Bstr IPAddress;
    9193        Bstr networkMask;
    92         Bstr FromIPAddress;
    93         Bstr ToIPAddress;
     94        Bstr lowerIP;
     95        Bstr upperIP;
    9496        BOOL enabled;
    9597    } m;
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r17881 r17888  
    257257<xsd:complexType name="TDhcpServer">
    258258  <xsd:attribute name="networkName" type="xsd:string"  use="required"/>
    259   <xsd:attribute name="lowerIp"     type="xsd:string"  use="required"/>
    260   <xsd:attribute name="upperIp"     type="xsd:string"  use="required"/>
     259  <xsd:attribute name="lowerIP"     type="xsd:string"  use="required"/>
     260  <xsd:attribute name="upperIP"     type="xsd:string"  use="required"/>
    261261  <xsd:attribute name="IPAddress"   type="xsd:string"  use="required"/>
    262262  <xsd:attribute name="networkMask" type="xsd:string"  use="required"/>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette