Changeset 21661 in vbox
- Timestamp:
- Jul 17, 2009 3:27:41 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50198
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/libalias/alias_db.c
r21630 r21661 193 193 /* Parameters used for cleanup of expired links */ 194 194 /* NOTE: ALIAS_CLEANUP_INTERVAL_SECS must be less then LINK_TABLE_OUT_SIZE */ 195 #ifndef VBOX 196 # define ALIAS_CLEANUP_INTERVAL_SECS 64 197 # define ALIAS_CLEANUP_MAX_SPOKES (LINK_TABLE_OUT_SIZE/5) 195 #define ALIAS_CLEANUP_INTERVAL_SECS 64 196 #define ALIAS_CLEANUP_MAX_SPOKES (LINK_TABLE_OUT_SIZE/5) 198 197 199 198 /* Timeouts (in seconds) for different link types */ 200 # 201 # 202 # 203 # 204 # 199 #define ICMP_EXPIRE_TIME 60 200 #define UDP_EXPIRE_TIME 60 201 #define PROTO_EXPIRE_TIME 60 202 #define FRAGMENT_ID_EXPIRE_TIME 10 203 #define FRAGMENT_PTR_EXPIRE_TIME 30 205 204 206 205 /* TCP link expire time for different cases */ 207 206 /* When the link has been used and closed - minimal grace time to 208 207 allow ACKs and potential re-connect in FTP (XXX - is this allowed?) */ 209 # 210 # 211 # 208 #ifndef TCP_EXPIRE_DEAD 209 #define TCP_EXPIRE_DEAD 10 210 #endif 212 211 213 212 /* When the link has been used and closed on one side - the other side 214 213 is allowed to still send data */ 215 # 216 # 217 # 214 #ifndef TCP_EXPIRE_SINGLEDEAD 215 #define TCP_EXPIRE_SINGLEDEAD 90 216 #endif 218 217 219 218 /* When the link isn't yet up */ 220 # 221 # 222 # 219 #ifndef TCP_EXPIRE_INITIAL 220 #define TCP_EXPIRE_INITIAL 300 221 #endif 223 222 224 223 /* When the link is up */ 225 # ifndef TCP_EXPIRE_CONNECTED 226 # define TCP_EXPIRE_CONNECTED 86400 227 # endif 228 #else /* VBOX */ 229 # define ALIAS_CLEANUP_INTERVAL_SECS (64 * 1000) 230 # define ALIAS_CLEANUP_MAX_SPOKES (LINK_TABLE_OUT_SIZE/5) 231 232 /* Timeouts (in seconds) for different link types */ 233 # define ICMP_EXPIRE_TIME (60 * 1000) 234 # define UDP_EXPIRE_TIME (60 * 1000) 235 # define PROTO_EXPIRE_TIME (60 * 1000) 236 # define FRAGMENT_ID_EXPIRE_TIME (10 * 1000) 237 # define FRAGMENT_PTR_EXPIRE_TIME (30 * 1000) 238 239 /* TCP link expire time for different cases */ 240 /* When the link has been used and closed - minimal grace time to 241 allow ACKs and potential re-connect in FTP (XXX - is this allowed?) */ 242 # ifndef TCP_EXPIRE_DEAD 243 # define TCP_EXPIRE_DEAD (10 * 1000) 244 # endif 245 246 /* When the link has been used and closed on one side - the other side 247 is allowed to still send data */ 248 # ifndef TCP_EXPIRE_SINGLEDEAD 249 # define TCP_EXPIRE_SINGLEDEAD (90 * 1000) 250 # endif 251 252 /* When the link isn't yet up */ 253 # ifndef TCP_EXPIRE_INITIAL 254 # define TCP_EXPIRE_INITIAL (300 * 1000) 255 # endif 256 257 /* When the link is up */ 258 # ifndef TCP_EXPIRE_CONNECTED 259 # define TCP_EXPIRE_CONNECTED (86400 * 1000) 260 # endif 261 #endif 224 #ifndef TCP_EXPIRE_CONNECTED 225 #define TCP_EXPIRE_CONNECTED 86400 226 #endif 227 262 228 263 229 /* Dummy port number codes used for FindLinkIn/Out() and AddLink(). … … 2305 2271 int i, n; 2306 2272 #ifndef VBOX 2307 # 2273 #ifndef _KERNEL 2308 2274 struct timeval tv; 2309 2275 struct timezone tz; 2310 # 2276 #endif 2311 2277 2312 2278 LIBALIAS_LOCK_ASSERT(la); … … 2316 2282 * waste timeline by making system calls. 2317 2283 */ 2318 # 2284 #ifdef _KERNEL 2319 2285 la->timeStamp = time_uptime; 2320 # 2286 #else 2321 2287 gettimeofday(&tv, &tz); 2322 2288 la->timeStamp = tv.tv_sec; 2323 # 2289 #endif 2324 2290 #else /* !VBOX */ 2325 2291 LIBALIAS_LOCK_ASSERT(la);
Note:
See TracChangeset
for help on using the changeset viewer.