Changeset 28147 in vbox for trunk/src/VBox/NetworkServices/NAT
- Timestamp:
- Apr 9, 2010 2:24:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/VBoxNetNAT.cpp
r28146 r28147 108 108 volatile uint32_t cUrgPkt; 109 109 volatile uint32_t cPkt; 110 111 PRTTIMER pTmrSlow; 112 PRTTIMER pTmrFast; 113 bool fIsRunning; 110 bool fIsRunning; 114 111 }; 115 112 … … 126 123 static void SendWorker(struct mbuf *m, size_t cb); 127 124 static 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 127 static void natNotifyNATThread(void) 151 128 { 152 129 int rc; … … 222 199 rc = RTThreadCreate(&m_ThrSndNAT, natSndThread, this, 128 * _1K, RTTHREADTYPE_DEFAULT, 0, "SndNAT"); 223 200 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);226 201 rc = RTSemEventCreate(&m_EventSend); 227 202 rc = RTSemEventCreate(&m_EventUrgSend);
Note:
See TracChangeset
for help on using the changeset viewer.