VirtualBox

Changeset 87790 in vbox


Ignore:
Timestamp:
Feb 18, 2021 4:31:03 PM (4 years ago)
Author:
vboxsync
Message:

NAT/Net: Rename init methods so that related methods share common
prefix. bugref:9929.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp

    r87743 r87790  
    191191
    192192private:
    193     int comInit();
    194     int homeInit();
    195     int logInit();
    196     int ipv4Init();
    197     int ipv4LoopbackMapInit();
    198     int ipv6Init();
    199     int eventsInit();
     193    int initCom();
     194    int initHome();
     195    int initLog();
     196    int initIPv4();
     197    int initIPv4LoopbackMap();
     198    int initIPv6();
     199    int initComEvents();
    200200
    201201    int getExtraData(com::Utf8Str &strValueOut, const char *pcszKey);
     
    210210    static void reportErrorInfo(const com::ErrorInfo &info);
    211211
    212     void createRawSock4();
    213     void createRawSock6();
     212    void initIPv4RawSock();
     213    void initIPv6RawSock();
    214214
    215215    static DECLCALLBACK(void) onLwipTcpIpInit(void *arg);
     
    351351
    352352    /* Get the COM API set up. */
    353     rc = comInit();
     353    rc = initCom();
    354354    if (RT_FAILURE(rc))
    355355        return rc;
    356356
    357357    /* Get the home folder location.  It's ok if it fails. */
    358     homeInit();
     358    initHome();
    359359
    360360    /*
     
    375375     * indeed exists we can create the release log file.
    376376     */
    377     logInit();
     377    initLog();
    378378
    379379    // resolver changes are reported on vbox but are retrieved from
     
    384384
    385385    /* Get the settings related to IPv4. */
    386     rc = ipv4Init();
     386    rc = initIPv4();
    387387    if (RT_FAILURE(rc))
    388388        return rc;
    389389
    390390    /* Get the settings related to IPv6. */
    391     rc = ipv6Init();
     391    rc = initIPv6();
    392392    if (RT_FAILURE(rc))
    393393        return rc;
    394 
    395394
    396395
     
    412411    m_ProxyOptions.nameservers = getHostNameservers();
    413412
    414     eventsInit();
     413    initComEvents();
    415414    /* end of COM initialization */
    416415
     
    441440 * it ourselves and do the refactoring later.
    442441 */
    443 int VBoxNetLwipNAT::comInit()
     442int VBoxNetLwipNAT::initCom()
    444443{
    445444    HRESULT hrc;
     
    489488 * and for the TFTP root location.
    490489 */
    491 int VBoxNetLwipNAT::homeInit()
     490int VBoxNetLwipNAT::initHome()
    492491{
    493492    HRESULT hrc;
     
    524523 * onLwipTcpIpInit().
    525524 */
    526 int VBoxNetLwipNAT::ipv4Init()
     525int VBoxNetLwipNAT::initIPv4()
    527526{
    528527    HRESULT hrc;
     
    590589
    591590    /* Raw socket for ICMP. */
    592     createRawSock4();
     591    initIPv4RawSock();
    593592
    594593
     
    616615
    617616    /* Make host's loopback(s) available from inside the natnet */
    618     ipv4LoopbackMapInit();
     617    initIPv4LoopbackMap();
    619618
    620619    return VINF_SUCCESS;
     
    628627 * caching dns proxy on 127.0.1.1 or 127.0.0.53.
    629628 */
    630 int VBoxNetLwipNAT::ipv4LoopbackMapInit()
     629int VBoxNetLwipNAT::initIPv4LoopbackMap()
    631630{
    632631    HRESULT hrc;
     
    740739 * onLwipTcpIpInit().
    741740 */
    742 int VBoxNetLwipNAT::ipv6Init()
     741int VBoxNetLwipNAT::initIPv6()
    743742{
    744743    HRESULT hrc;
     
    836835
    837836    /* Raw socket for ICMP. */
    838     createRawSock6();
     837    initIPv6RawSock();
    839838
    840839
     
    10061005 * Create and register API event listeners.
    10071006 */
    1008 int VBoxNetLwipNAT::eventsInit()
     1007int VBoxNetLwipNAT::initComEvents()
    10091008{
    10101009    /**
     
    10451044 * Create raw IPv4 socket for sending and snooping ICMP.
    10461045 */
    1047 void VBoxNetLwipNAT::createRawSock4()
     1046void VBoxNetLwipNAT::initIPv4RawSock()
    10481047{
    10491048    SOCKET icmpsock4 = INVALID_SOCKET;
     
    10921091 * Create raw IPv6 socket for sending and snooping ICMP6.
    10931092 */
    1094 void VBoxNetLwipNAT::createRawSock6()
     1093void VBoxNetLwipNAT::initIPv6RawSock()
    10951094{
    10961095    SOCKET icmpsock6 = INVALID_SOCKET;
     
    20072006 */
    20082007/* static */
    2009 int VBoxNetLwipNAT::logInit()
     2008int VBoxNetLwipNAT::initLog()
    20102009{
    20112010    size_t cch;
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