Changeset 20086 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- May 27, 2009 2:21:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.h
r20053 r20086 375 375 # endif 376 376 #if defined(VBOX_WITH_SLIRP_ALIAS) && defined(VBOX_SLIRP_ALIAS) 377 # define ip_next(ip) (uintptr_t)((uint8_t *)(ip) + ((ip)->ip_hl << 2)) 377 378 # define ip_next(ip) (void *)((uint8_t *)(ip) + ((ip)->ip_hl << 2)) 378 379 # define bcopy(src, dst, len) memcpy((dst), (src), (len)) 379 380 # define NO_FW_PUNCH 381 380 382 # ifdef alias_addr 381 383 # error alias_addr has already defined!!! 382 384 # endif 385 383 386 # define arc4random() RTRandU32() 384 387 # undef malloc … … 395 398 396 399 # define LIBALIAS_DEBUG 400 397 401 # ifdef fprintf 398 402 # undef fprintf 399 # define fprintf vbox_slirp_fprintf400 403 # endif /*fprintf*/ 401 static inline void vbox_slirp_fprintf(void *ignored, char *msg, ...) 404 # define fprintf vbox_slirp_fprintf 405 static void vbox_slirp_fprintf(void *ignored, char *format, ...) 402 406 { 403 407 /* define LogIt(pvInst, fFlags, iGroup, fmtargs) */ 404 408 va_list args; 405 register PRTLOGGER LogIt_pLogger; 406 char buffer[2048]; 407 memset(buffer, 0, 2048); 408 memcpy(buffer, "NAT: ALIAS:", 11); 409 va_start(args, msg); 410 RTStrPrintfV(&buffer[11], 2048 - 11, msg, args); 411 412 LogIt_pLogger = (PRTLOGGER)(LOG_INSTANCE) ? 413 (PRTLOGGER)(LOG_INSTANCE) : RTLogDefaultInstance(); 414 if (LogIt_pLogger) 415 { 416 RTLogPrintfEx(LogIt_pLogger, 417 ((RTLOGGRPFLAGS_LEVEL_2) | RTLOGGRPFLAGS_ENABLED), LOG_GROUP, 418 msg, buffer); 419 } 409 char buffer[1024]; 410 memset(buffer, 0, 1024); 411 va_start(args, format); 412 RTStrPrintfV(buffer, 1024, format, args); 420 413 va_end(args); 414 415 Log2(("%s\n", buffer)); 421 416 } 422 417 #endif /*VBOX_WITH_SLIRP_ALIAS && VBOX_SLIRP_ALIAS*/
Note:
See TracChangeset
for help on using the changeset viewer.