VirtualBox

Changeset 50045 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jan 10, 2014 1:50:27 AM (11 years ago)
Author:
vboxsync
Message:

NAT/Slirp: helper function slirp_host_network_configuration_change_strategy_selector reporting the hint for client (DrvNAT) which strategy to select on Host network change event or Host resume.

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/libslirp.h

    r48150 r50045  
    9696void slirp_set_somaxconn(PNATState pData, int iSoMaxConn);
    9797
     98/**
     99 * This method help DrvNAT to select strategy: about VMRESUMEREASON_HOST_RESUME:
     100 * - proceed with link termination (we let guest track host DNS settings)
     101 *    VBOX_NAT_HNCE_EXPOSED_NAME_RESOLVING_INFO
     102 * - enforce internal DNS update (we are using dnsproxy and track but don't export DNS host settings)
     103 *    VBOX_NAT_HNCE_DNSPROXY
     104 * - ignore (NAT configured to use hostresolver - we aren't track any host DNS changes)
     105 *    VBOX_NAT_HNCE_HOSTRESOLVER
     106 * @note: It's safe to call this method from any thread, because settings we're checking
     107 * are immutable at runtime.
     108 */
     109#define VBOX_NAT_HNCE_EXSPOSED_NAME_RESOLUTION_INFO 0
     110#define VBOX_NAT_HNCE_DNSPROXY 1
     111#define VBOX_NAT_HNCE_HOSTRESOLVER 2
     112int slirp_host_network_configuration_change_strategy_selector(const PNATState);
    98113#if defined(RT_OS_WINDOWS)
    99114
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r49347 r50045  
    20332033    }
    20342034}
     2035
     2036
     2037int slirp_host_network_configuration_change_strategy_selector(const PNATState pData)
     2038{
     2039    if (pData->fUseHostResolver) return VBOX_NAT_HNCE_HOSTRESOLVER;
     2040    if (pData->fUseDnsProxy) return VBOX_NAT_HNCE_DNSPROXY;
     2041    return VBOX_NAT_HNCE_EXSPOSED_NAME_RESOLUTION_INFO;
     2042}
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