VirtualBox

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


Ignore:
Timestamp:
Apr 9, 2010 2:24:34 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59877
Message:

NAT: Fixed missing setting of time_fasttimo in ip_icmp.c. Removed slirp_arm_fast_timer and slirp_arm_slow_timer.

Location:
trunk/src/VBox/Devices/Network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r28146 r28147  
    196196    volatile uint32_t       cUrgPkt;
    197197    volatile uint32_t       cPkt;
    198     PTMTIMERR3              pTmrSlow;
    199     PTMTIMERR3              pTmrFast;
    200198} DRVNAT;
    201199AssertCompileMemberAlignment(DRVNAT, StatNATRecvWakeups, 8);
     
    832830#endif /* VBOX_WITH_SLIRP_MT */
    833831
    834 
    835 /**
    836  * The callback for the fast (2 ms) NAT timer.
    837  *
    838  * @param   pDrvIns             The driver instance.
    839  * @param   pTimer              The timer handle.
    840  * @param   pvUser              The NAT instance data.
    841  */
    842 static DECLCALLBACK(void) drvNATFastTimer(PPDMDRVINS pDrvIns, PTMTIMER pTimer, void *pvUser)
    843 {
    844     PDRVNAT pThis = (PDRVNAT)pvUser;
    845     drvNATNotifyNATThread(pThis, "drvNATFastTimer");
    846 }
    847 
    848 void slirp_arm_fast_timer(void *pvUser)
    849 {
    850 #if 0
    851     PDRVNAT pThis = (PDRVNAT)pvUser;
    852     AssertPtr(pThis);
    853     TMTimerSetMillies(pThis->pTmrFast, 2);
    854 #endif
    855 }
    856 
    857 /**
    858  * The callback for the slow (500 ms) NAT timer.
    859  *
    860  * @param   pDrvIns             The driver instance.
    861  * @param   pTimer              The timer handle.
    862  * @param   pvUser              The NAT instance data.
    863  */
    864 static DECLCALLBACK(void) drvNATSlowTimer(PPDMDRVINS pDrvIns, PTMTIMER pTimer, void *pvUser)
    865 {
    866     PDRVNAT pThis = (PDRVNAT)pvUser;
    867     drvNATNotifyNATThread(pThis, "drvNATSlowTimer");
    868 }
    869 
    870 void slirp_arm_slow_timer(void *pvUser)
    871 {
    872 #if 0
    873     PDRVNAT pThis = (PDRVNAT)pvUser;
    874     AssertPtr(pThis);
    875 
    876     TMTimerSetMillies(pThis->pTmrSlow, 500);
    877 #endif
    878 }
    879 
    880832/**
    881833 * Function called by slirp to check if it's possible to feed incoming data to the network port.
     
    12761228            rc = RTSemEventCreate(&pThis->EventUrgRecv);
    12771229            rc = RTCritSectInit(&pThis->csDevAccess);
    1278             rc = PDMDrvHlpTMTimerCreate(pThis->pDrvIns, TMCLOCK_REAL/*enmClock*/, drvNATSlowTimer,
    1279                     pThis, TMTIMER_FLAGS_NO_CRIT_SECT/*flags*/, "NATSlowTmr", &pThis->pTmrSlow);
    1280             rc = PDMDrvHlpTMTimerCreate(pThis->pDrvIns, TMCLOCK_REAL/*enmClock*/, drvNATFastTimer,
    1281                     pThis, TMTIMER_FLAGS_NO_CRIT_SECT/*flags*/, "NATFastTmr", &pThis->pTmrFast);
    12821230
    12831231#ifndef RT_OS_WINDOWS
  • trunk/src/VBox/Devices/Network/slirp/ip_icmp.c

    r27976 r28147  
    423423                        icmp_error(pData, m, ICMP_UNREACH, ICMP_UNREACH_NET, 0, strerror(errno));
    424424                    }
    425                     else
    426                         slirp_arm_fast_timer(pData->pvUser);
     425                    else if (!time_fasttimo)
     426                    {
     427                        time_fasttimo = curtime; /* Flag when we want a fasttimo */
     428                    }
    427429
    428430                }
  • trunk/src/VBox/Devices/Network/slirp/libslirp.h

    r27848 r28147  
    5454/* you must provide the following functions: */
    5555void slirp_arm_fast_timer(void *pvUser);
    56 void slirp_arm_slow_timer(void *pvUser);
    5756int slirp_can_output(void * pvUser);
    5857void slirp_output(void * pvUser, struct mbuf *m, const uint8_t *pkt, int pkt_len);
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r28146 r28147  
    836836            {
    837837                do_slowtimo = 1;
    838                 slirp_arm_slow_timer(pData->pvUser);
    839838                break;
    840839            }
     
    875874        {
    876875            time_fasttimo = curtime; /* Flag when we want a fasttimo */
    877             slirp_arm_fast_timer(pData->pvUser);
    878876        }
    879877
     
    977975            {
    978976                do_slowtimo = 1; /* Let socket expire */
    979                 slirp_arm_slow_timer(pData->pvUser);
    980977            }
    981978        }
Note: See TracChangeset for help on using the changeset viewer.

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