- Timestamp:
- Jun 14, 2009 5:25:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r20457 r20555 1 /* $Id$ */ 1 2 /** @file 2 * 3 * VBox network devices: 4 * NAT network transport driver 3 * DrvNAT - NAT network transport driver. 5 4 */ 6 5 7 6 /* 8 * Copyright (C) 2006-200 7Sun Microsystems, Inc.7 * Copyright (C) 2006-2009 Sun Microsystems, Inc. 9 8 * 10 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 49 48 #include <iprt/req.h> 50 49 50 51 /******************************************************************************* 52 * Defined Constants And Macros * 53 *******************************************************************************/ 51 54 /** 52 55 * @todo: This is a bad hack to prevent freezing the guest during high network … … 56 59 #ifdef VBOX_WITH_STATISTICS 57 60 # 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) 63 66 # include "Network/slirp/counters.h" 64 67 # undef COUNTING_COUTER … … 69 72 slirp_counting_counter_##name##_inc(pData) 70 73 # define DRVNAT_COUNTER_ADD(pData, name, val) \ 71 slirp_counting_counter_##name##_add(pData, (val)) 74 slirp_counting_counter_##name##_add(pData, (val)) 72 75 #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 77 82 /******************************************************************************* 78 83 * Structures and Typedefs * … … 838 843 setter(pThis->pNATState, len); \ 839 844 }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 845 850 slirp_register_timers(pThis->pNATState, pDrvIns); 846 851 int rc2 = drvNATConstructRedir(pDrvIns->iInstance, pThis, pCfgHandle, Network);
Note:
See TracChangeset
for help on using the changeset viewer.