VirtualBox

Changeset 87695 in vbox for trunk/src/VBox/NetworkServices


Ignore:
Timestamp:
Feb 10, 2021 5:10:05 PM (4 years ago)
Author:
vboxsync
Message:

NAT/Net: G/c unused code. bugref:9929.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NetLib/utils.h

    r84364 r87695  
    3737typedef std::vector<RTNETADDRIPV4> AddressList;
    3838typedef std::map<RTNETADDRIPV4, int> AddressToOffsetMapping;
    39 
    40 
    41 inline bool isDhcpRequired(const ComNatPtr& nat)
    42 {
    43     BOOL fNeedDhcpServer = false;
    44     if (FAILED(nat->COMGETTER(NeedDhcpServer)(&fNeedDhcpServer)))
    45         return false;
    46 
    47     return RT_BOOL(fNeedDhcpServer);
    48 }
    49 
    50 
    51 inline int findDhcpServer(const ComVirtualBoxPtr& vbox, const std::string& name, ComDhcpServerPtr& dhcp)
    52 {
    53     HRESULT hrc = vbox->FindDHCPServerByNetworkName(com::Bstr(name.c_str()).raw(),
    54                                                           dhcp.asOutParam());
    55     AssertComRCReturn(hrc, VERR_NOT_FOUND);
    56 
    57     return VINF_SUCCESS;
    58 }
    59 
    60 
    61 inline int findNatNetwork(const ComVirtualBoxPtr& vbox, const std::string& name, ComNatPtr& nat)
    62 {
    63     HRESULT hrc = vbox->FindNATNetworkByName(com::Bstr(name.c_str()).raw(),
    64                                                    nat.asOutParam());
    65 
    66     AssertComRCReturn(hrc, VERR_NOT_FOUND);
    67 
    68     return VINF_SUCCESS;
    69 }
    7039
    7140
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