VirtualBox

Changeset 20555 in vbox for trunk/src


Ignore:
Timestamp:
Jun 14, 2009 5:25:25 PM (16 years ago)
Author:
vboxsync
Message:

DrvNAT.cpp: file header + style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r20457 r20555  
     1/* $Id$ */
    12/** @file
    2  *
    3  * VBox network devices:
    4  * NAT network transport driver
     3 * DrvNAT - NAT network transport driver.
    54 */
    65
    76/*
    8  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    98 *
    109 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4948#include <iprt/req.h>
    5049
     50
     51/*******************************************************************************
     52*   Defined Constants And Macros                                               *
     53*******************************************************************************/
    5154/**
    5255 * @todo: This is a bad hack to prevent freezing the guest during high network
     
    5659#ifdef VBOX_WITH_STATISTICS
    5760# define COUNTING_COUTER(name, dsc) \
    58 extern "C" void slirp_counting_counter_##name##_reset(PNATState pData); \
    59 extern "C" void slirp_counting_counter_##name##_inc(PNATState pData); \
    60 extern "C" void slirp_counting_counter_##name##_add(PNATState pData, int val);
    61 /* @todo think abaout it */
    62 # define PROFILE_COUNTER(name, dsc) 
     61    extern "C" void slirp_counting_counter_##name##_reset(PNATState pData); \
     62    extern "C" void slirp_counting_counter_##name##_inc(PNATState pData); \
     63    extern "C" void slirp_counting_counter_##name##_add(PNATState pData, int val);
     64/** @todo think abaout it */
     65# define PROFILE_COUNTER(name, dsc)
    6366# include "Network/slirp/counters.h"
    6467# undef COUNTING_COUTER
     
    6972    slirp_counting_counter_##name##_inc(pData)
    7073# define DRVNAT_COUNTER_ADD(pData, name, val) \
    71     slirp_counting_counter_##name##_add(pData, (val)) 
     74    slirp_counting_counter_##name##_add(pData, (val))
    7275#else
    73 #define DRVNAT_COUNTER_RESET(pData, name) do{}while(0)
    74 #define DRVNAT_COUNTER_INC(pData, name) do{}while(0)
    75 #define DRVNAT_COUNTER_ADD(pData, name) do{}while(0)
    76 #endif
     76# define DRVNAT_COUNTER_RESET(pData, name) do{}while(0)
     77# define DRVNAT_COUNTER_INC(pData, name) do{}while(0)
     78# define DRVNAT_COUNTER_ADD(pData, name) do{}while(0)
     79#endif
     80
     81
    7782/*******************************************************************************
    7883*   Structures and Typedefs                                                    *
     
    838843            setter(pThis->pNATState, len);              \
    839844    }while(0)
    840         SLIRP_SET_TUNING_VALUE("SocketRcvBuf", slirp_set_rcvbuf); 
    841         SLIRP_SET_TUNING_VALUE("SocketSndBuf", slirp_set_sndbuf); 
    842         SLIRP_SET_TUNING_VALUE("TcpRcvSpace", slirp_set_tcp_rcvspace); 
    843         SLIRP_SET_TUNING_VALUE("TcpSndSpace", slirp_set_tcp_sndspace); 
    844    
     845        SLIRP_SET_TUNING_VALUE("SocketRcvBuf", slirp_set_rcvbuf);
     846        SLIRP_SET_TUNING_VALUE("SocketSndBuf", slirp_set_sndbuf);
     847        SLIRP_SET_TUNING_VALUE("TcpRcvSpace", slirp_set_tcp_rcvspace);
     848        SLIRP_SET_TUNING_VALUE("TcpSndSpace", slirp_set_tcp_sndspace);
     849
    845850        slirp_register_timers(pThis->pNATState, pDrvIns);
    846851        int rc2 = drvNATConstructRedir(pDrvIns->iInstance, pThis, pCfgHandle, Network);
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