VirtualBox

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


Ignore:
Timestamp:
Jun 3, 2009 2:44:18 PM (16 years ago)
Author:
vboxsync
Message:

NAT/libalias: forwarding printf (in alias_nbt) to Log2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/slirp.h

    r20203 r20233  
    379379# define udp_next(udp) (void *)((uint8_t *)&((struct udphdr *)(udp))[1] )
    380380# define bcopy(src, dst, len) memcpy((dst), (src), (len))
     381# define bcmp(a1, a2, len) memcmp((a1), (a2), (len))
    381382# define NO_FW_PUNCH
    382383
     
    406407#   undef fflush
    407408# endif /*fflush*/
     409# ifdef printf
     410#   undef printf
     411# endif /*printf*/
    408412#define fflush(x) do{}while(0)
    409413# define fprintf vbox_slirp_fprintf
     414# define printf vbox_slirp_printf
     415static void vbox_slirp_printV(char *format, va_list args)
     416{
     417    char buffer[1024];
     418    memset(buffer, 0, 1024);
     419    RTStrPrintfV(buffer, 1024, format, args);
     420
     421    Log2(("NAT:ALIAS: %s\n", buffer));
     422}
     423static void vbox_slirp_printf(char *format, ...)
     424{
     425    va_list args;
     426    va_start(args, format);
     427    vbox_slirp_printV(format, args);
     428    va_end(args);
     429}
    410430static void vbox_slirp_fprintf(void *ignored, char *format, ...)
    411431{
    412 /*  define LogIt(pvInst, fFlags, iGroup, fmtargs) */
    413432    va_list args;
    414     char buffer[1024];
    415     memset(buffer, 0, 1024);
    416433    va_start(args, format);
    417     RTStrPrintfV(buffer, 1024, format, args);
     434    vbox_slirp_printV(format, args);
    418435    va_end(args);
    419 
    420     Log2(("%s\n", buffer));
    421436}
    422437#endif /*VBOX_WITH_SLIRP_ALIAS && VBOX_SLIRP_ALIAS*/
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