VirtualBox

Ignore:
Timestamp:
Apr 9, 2010 2:24:34 PM (15 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

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

    r28146 r28147  
    108108    volatile uint32_t       cUrgPkt;
    109109    volatile uint32_t       cPkt;
    110 
    111     PRTTIMER              pTmrSlow;
    112     PRTTIMER              pTmrFast;
    113     bool                  fIsRunning;
     110    bool                    fIsRunning;
    114111};
    115112
     
    126123static void SendWorker(struct mbuf *m, size_t cb);
    127124static void IntNetSendWorker(bool urg, const void *pvFrame, size_t cbFrame, struct mbuf *m);
    128 static void natNotifyNATThread();
    129 
    130 void slirp_arm_fast_timer(void *pvUser)
    131 {
    132     RTTimerStart(g_pNAT->pTmrFast, 2);
    133 }
    134 
    135 void slirp_arm_slow_timer(void *pvUser)
    136 {
    137     RTTimerStart(g_pNAT->pTmrSlow, 500);
    138 }
    139 
    140 static DECLCALLBACK(void) natSlowTimer(PRTTIMER ppTimer, void *pvUser, uint64_t iTick)
    141 {
    142     natNotifyNATThread();
    143 }
    144 
    145 static DECLCALLBACK(void) natFastTimer(PRTTIMER ppTimer, void *pvUser, uint64_t iTick)
    146 {
    147     natNotifyNATThread();
    148 }
    149 
    150 static void natNotifyNATThread()
     125
     126
     127static void natNotifyNATThread(void)
    151128{
    152129    int rc;
     
    222199    rc = RTThreadCreate(&m_ThrSndNAT, natSndThread, this, 128 * _1K, RTTHREADTYPE_DEFAULT, 0, "SndNAT");
    223200    rc = RTThreadCreate(&m_ThrUrgSndNAT, natUrgSndThread, this, 128 * _1K, RTTHREADTYPE_DEFAULT, 0, "UrgSndNAT");
    224     rc = RTTimerCreate(&pTmrSlow, 0 /* one-shot */, natSlowTimer, this);
    225     rc = RTTimerCreate(&pTmrFast, 0 /* one-shot */ , natFastTimer, this);
    226201    rc = RTSemEventCreate(&m_EventSend);
    227202    rc = RTSemEventCreate(&m_EventUrgSend);
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